I’m using the CI/CD functionality through GitLab.com to build and deploy a single page application written in VueJS. Since this application is entirely client-side I need to use the environment variables set in the UI (
Repo → Settings → CI/CD → Variables) during the build stage. This seems to work as expected by setting the environment key for the build stage in the
.gitlab-ci.yaml configuration. For example
build prod: stage: build environment: production image: docker:latest build staging: stage: build environment: staging image: docker:latest
However, I then receive email notifications from GitLab that the project has been deployed even though only the build stage has been executed.
Is there another way to access the configured environment variables set from the UI during the build stage without causing GitLab to think the application has been deployed?
Thanks for taking the time to be thorough in your request, it really helps!