Skip to content

Commit

Permalink
Merge pull request #148 from DSD-DBS/fix-production-tag-check
Browse files Browse the repository at this point in the history
Remove production only on tags
  • Loading branch information
MoritzWeber0 authored May 31, 2023
2 parents 40ccdf4 + e180f8c commit 05e45ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion ci-templates/gitlab/image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ default:
- docker pull $BASE_IMAGE

.push: &push
- 'if [ "$ENVIRONMENT" = "production" -a -z "$CI_COMMIT_TAG" ]; then echo "You can only push to production when running the pipeline on a tag!" && exit 1; fi'
- docker push $IMAGE:$DOCKER_TAG

.ease: &ease
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ci-templates/gitlab/image-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In addition, you have to add the following environment variables on repository l
Make sure to enable the "Expand variable reference" flag.

- `CAPELLA_DOCKER_IMAGES_REVISION`: Revision of this Github repository.
- `ENVIRONMENT`: Specifies the environemnt. We have included a safety gate, such that you are only able to push to the "production" environment on tags. In addition, you need to have the following variables for each environment:
- `ENVIRONMENT`: Specifies the environment. In addition, you need to have the following variables for each environment:
- `UID_${ENVIRONMENT}`: The user ID which will be used for the technical user.
- Variables related to the Docker registry (all parameters are passed to `docker login`):
- `DOCKER_REGISTRY_${ENVIRONMENT}`: The URL to the Docker registry
Expand Down

0 comments on commit 05e45ad

Please sign in to comment.