-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci.yml
23 lines (22 loc) · 993 Bytes
/
.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
master_build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""]
only:
- master
except:
- tags
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- (echo a;/kaniko/executor --skip-tls-verify=true --context=$CI_PROJECT_DIR --dockerfile=$CI_PROJECT_DIR/Dockerfile --destination=$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME)
tagged_build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""]
only:
- tags
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- (echo a;/kaniko/executor --skip-tls-verify=true --context=$CI_PROJECT_DIR --dockerfile=$CI_PROJECT_DIR/Dockerfile --destination=$CI_REGISTRY_IMAGE:latest --destination=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG)