-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
37 lines (35 loc) · 992 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
33
34
35
36
37
stages:
- build
- deploy
build:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: build
before_script:
- mkdir -p /kaniko/.docker
- |
cat <<- EOF > /kaniko/.docker/config.json
{
"auths": {
"${CI_REGISTRY}": {
"auth": "$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')"
},
"https://index.docker.io/v1/": {
"auth": "$(printf "%s:%s" "${DOCKERHUB_USERNAME}" "${DOCKERHUB_PASSWORD}" | base64 | tr -d '\n')"
}
}
}
EOF
script:
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--skip-unused-stages
--destination "${CI_REGISTRY_IMAGE}:${OPENSEEFACE_VERSION}"
--destination "${CI_REGISTRY_IMAGE}:latest"
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'