-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
32 lines (31 loc) · 1005 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
24
25
26
27
28
29
30
31
32
#image:
# name: quay.io/buildah/stable:latest
# entrypoint: [""]
#
#build-master:
# retry: 1
# stage: build
# tags: ["privileged"]
# variables:
# STORAGE_DRIVER: "vfs"
# BUILDAH_FORMAT: "docker"
# BUILDAH_ISOLATION: "rootless"
#
# script:
# - buildah login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
# - buildah bud --build-arg CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE --tag $CI_REGISTRY_IMAGE $CI_PROJECT_DIR
# - buildah push $CI_REGISTRY_IMAGE docker://$CI_REGISTRY_IMAGE
#
# only:
# - master
build-master:
retry: 1
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.23.2-debug
entrypoint: [""]
only:
- master
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE --registry-mirror us0.regi.kube.gmp.io