2022-02-24 22:44:42 +00:00
|
|
|
|
|
|
|
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
|
2022-02-27 16:58:00 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- "images/*"
|
|
|
|
- "images/**/*"
|
|
|
|
- "images/**"
|
2022-02-24 22:44:42 +00:00
|
|
|
|