-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
29 lines (26 loc) · 969 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
stages:
- build
- sync
variables:
GIT_SUBMODULE_STRATEGY: recursive
sync-job:
stage: build
image:
name: alpine
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "trigger"
- if: $CI_PIPELINE_SOURCE == "web"
script:
- apk add git
- git pull --ff-only https://github.com/ZaPF/zapf-ev-website.git main
- git push https://gitlab-ci-token:${GITLAB_PUSH_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git main
build-job:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH