-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
31 lines (30 loc) · 1.41 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# .gitlab-ci.yml - GitLab pipeline image build instructions
#
# Deployment is triggered by changing portainer/stack.yml. Be sure to
# bump up the image file build id by +1 here and in stack.yml
# before committing the changes back to the repository.
#
stages:
- build
build-job:
image: quay.io/buildah/stable
stage: build
variables:
## BUMP - bump the build id here and in stack.yml to trigger a new deployment.
BUILD_ID: 243
# Update stack.yml for Grouper version changes.
GROUPER_VERSION: 4.2.0
# Also update portainer/stack.yml if the image name changes.
GROUPER_IMAGE_NAME: $CI_REGISTRY:5001/iam/uh-grouper/grouper:$GROUPER_VERSION
GROUPER_IMAGE_TAG: $GROUPER_IMAGE_NAME-$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
GROUPER_BUILD_ID: $GROUPER_IMAGE_NAME-$BUILD_ID
script:
- buildah login --tls-verify=false -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY:5001
- echo "Build '${BUILD_ID}' begun at ${CI_COMMIT_TIMESTAMP}"
- buildah bud --build-arg GROUPER_VERSION=$GROUPER_VERSION -t $GROUPER_IMAGE_TAG .
- buildah tag $GROUPER_IMAGE_TAG $GROUPER_IMAGE_NAME-$CI_COMMIT_BRANCH-latest
- buildah tag $GROUPER_IMAGE_TAG $GROUPER_BUILD_ID
- buildah push --tls-verify=false $GROUPER_IMAGE_TAG
- buildah push --tls-verify=false $GROUPER_IMAGE_TAG $GROUPER_IMAGE_NAME-$CI_COMMIT_BRANCH-latest
- buildah push --tls-verify=false $GROUPER_BUILD_ID
- buildah version