2021-09-29 15:09:40 +02:00
|
|
|
stages:
|
|
|
|
- build-container
|
|
|
|
|
|
|
|
variables:
|
2021-11-22 15:54:46 +01:00
|
|
|
KANIKO_BUILD_IMAGENAME: dashboard-backend
|
2021-09-29 15:09:40 +02:00
|
|
|
|
|
|
|
build-container:
|
|
|
|
stage: build-container
|
|
|
|
image:
|
|
|
|
# We need a shell to provide the registry credentials, so we need to use the
|
|
|
|
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
|
|
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
|
|
entrypoint: [""]
|
|
|
|
script:
|
|
|
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
2021-10-26 10:46:13 +02:00
|
|
|
- /kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/ --dockerfile ${CI_PROJECT_DIR}/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_SLUG}
|