forked from suaustralia/adminerevo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
27 lines (23 loc) · 1008 Bytes
/
.gitlab-ci.yml
File metadata and controls
27 lines (23 loc) · 1008 Bytes
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
variables:
CONTAINER_IMAGE: australia-southeast1-docker.pkg.dev/suaus-dev/general/docker/adminerevo:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: australia-southeast1-docker.pkg.dev/suaus-dev/general/docker/adminerevo:latest
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
# This relies on GOOGLE_APPLICATION_CREDENTIALS being set and pointing to the Google Service Account JSON file
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE --cache=true
release-image:
stage: build
needs:
- build
image:
name: gcr.io/go-containerregistry/gcrane:debug
entrypoint: [""]
# This relies on GOOGLE_APPLICATION_CREDENTIALS being set and pointing to the Google Service Account JSON file
script:
- gcrane cp $CONTAINER_IMAGE $CONTAINER_RELEASE_IMAGE
only:
- main # This should be set to the default branch, which should be the current "mainline" image