Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 18eeebab authored by Benoît's avatar Benoît
Browse files

Merge branch '1-improve-manifest-tool' into 'main'

Resolve "Improve manifest-tool"

Closes #1

See merge request !2
parents 17d32a0f 7cf2fdb7
No related branches found
No related tags found
1 merge request!2Resolve "Improve manifest-tool"
......@@ -51,23 +51,38 @@ include:
# - job: container-build
# artifacts: false
image:
name: mplatform/manifest-tool:alpine
name: captnbp/gitlab-ci-image:latest
script:
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/${CI_SERVER_HOST}/login role=${CI_PROJECT_NAME} token_ttl=600 jwt=$CI_JOB_JWT)"
- mkdir -p ${HOME}/.docker
- mv /kaniko/.docker/config.json ${HOME}/.docker/config.json
- |
mkdir -p ${HOME}/.docker
cp /kaniko/.docker/config.json ${HOME}/.docker/config.json
manifest-tool push from-args \
DIGEST=$(manifest-tool push from-args \
--platforms linux/amd64,linux/arm64 \
--template ${CI_IMAGE}-ARCH \
--target ${CI_IMAGE}
--target ${CI_IMAGE})
echo ${DIGEST}
digest=$(echo ${DIGEST} | awk '{print $2}')
echo "${CI_APPLICATION_REPOSITORY}@${digest}" >> image-digest-all.txt
- |
if [[ -n "${CI_COMMIT_TAG}" ]]; then
manifest-tool push from-args \
DIGEST=$(manifest-tool push from-args \
--platforms linux/amd64,linux/arm64 \
--template ${DOCKER_HUB_DESTINATION}:${CI_APPLICATION_TAG}-ARCH \
--target ${DOCKER_HUB_DESTINATION}:${CI_APPLICATION_TAG}
manifest-tool push from-args \
--target ${DOCKER_HUB_DESTINATION}:${CI_APPLICATION_TAG})
echo ${DIGEST}
digest=$(echo ${DIGEST} | awk '{print $2}')
echo "${DOCKER_HUB_DESTINATION}@${digest}" >> image-digest-all.txt
DIGEST=$(manifest-tool push from-args \
--platforms linux/amd64,linux/arm64 \
--template ${DOCKER_HUB_DESTINATION}:${CI_APPLICATION_TAG}-ARCH \
--target ${DOCKER_HUB_DESTINATION}:latest
echo ${DIGEST}
digest=$(echo ${DIGEST} | awk '{print $2}')
echo "${DOCKER_HUB_DESTINATION}@${digest}" >> image-digest-all.txt
fi
- cat image-digest-all.txt
artifacts:
paths:
- image-digest-all.txt
......@@ -9,6 +9,7 @@ include:
matrix:
- ARCH: amd64
- ARCH: arm64
- ARCH: all
script:
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/${CI_SERVER_HOST}/login role=${CI_PROJECT_NAME} token_ttl=60 jwt=$CI_JOB_JWT)"
- mkdir -p ${HOME}/.docker
......
image: captnbp/gitlab-ci-image:latest
\ No newline at end of file
image: captnbp/gitlab-ci-image:latest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment