-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
30 lines (29 loc) · 1.08 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
build:
stage: build
services: []
variables:
TAG: ${CI_COMMIT_REF_NAME}
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"${CI_DOCKERHUB_AUTH}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --build-arg TAG=${TAG} --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination=${ACCOUNT}/${CI_PROJECT_NAME}:${CI_PIPELINE_IID} --destination=${ACCOUNT}/${CI_PROJECT_NAME}:${TAG}
only:
refs:
- tags
build-master:
stage: build
services: []
variables:
TAG: ${CI_BUILD_REF_NAME}
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"${CI_DOCKERHUB_AUTH}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --build-arg TAG=master --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/main --destination=${ACCOUNT}/${CI_PROJECT_NAME}:${CI_PIPELINE_IID} --destination=${ACCOUNT}/${CI_PROJECT_NAME}:master
only:
- main
tags:
- bacon2