26 lines
806 B
YAML
26 lines
806 B
YAML
|
|
build-latest:
|
|
stage: build
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
entrypoint: [""]
|
|
script:
|
|
- mkdir -p /kaniko/.docker
|
|
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
|
- >-
|
|
for img in $(ls -1 images/*/Dockerfile | sed 's|^images/\(.*\)/Dockerfile|\1|g');do
|
|
/kaniko/executor \
|
|
--force \
|
|
--cache=true \
|
|
--context "${CI_PROJECT_DIR}/images/$img" \
|
|
--dockerfile "${CI_PROJECT_DIR}/images/$img/Dockerfile" \
|
|
--destination "${CI_REGISTRY_IMAGE}/$img:${CI_COMMIT_TAG}"
|
|
done
|
|
# except:
|
|
# - tags
|
|
only:
|
|
changes:
|
|
- "images/*"
|
|
- "images/**/*"
|
|
- "images/**"
|
|
|