Not sure if this is possible. But I want to change this line of code inside the dockerfile
RUN $(npm bin)/ng build --prod --env=prod
to
RUN $(npm bin)/ng build --prod --env=test
Or better, how to do something like this in the gitbal-ci.yml file:
build:
stage: build
script:
- docker build --pull -t $CONTAINER_ENV_IMAGE .
- docker push $CONTAINER_ENV_IMAGE
args:
- env=prod
only:
- master
build:
stage: build
script:
- docker build --pull -t $CONTAINER_ENV_IMAGE .
- docker push $CONTAINER_ENV_IMAGE
args:
- env=test
except:
- master
but only if the git branch name is a test. I use gitlab to create images.
I need this to change the url api environment variable in angular. Is this possible or are there any better ways?
source
share