CI: minor tweaks
This commit is contained in:
parent
a01f786de4
commit
a31bb86a63
@ -247,13 +247,11 @@ deploy:bootstrap6:
|
||||
|
||||
## Cleanup...
|
||||
|
||||
cleanup:
|
||||
<<: *dind_definition
|
||||
stage: cleanup
|
||||
script:
|
||||
- ./scripts/delete_ci_image.sh gitlab-ci-token "${CI_BUILD_TOKEN}"
|
||||
"${CI_PROJECT_PATH_SLUG}/build"
|
||||
"${CI_BUILD_REF}"
|
||||
## Temporary allowed failure until image deletion is allowed on gitlab
|
||||
## https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13248
|
||||
allow_failure: true
|
||||
# cleanup:
|
||||
# <<: *dind_definition
|
||||
# stage: cleanup
|
||||
# script:
|
||||
# - apk add -U curl jq
|
||||
# - ./scripts/delete_ci_image.sh gitlab-ci-token "${CI_BUILD_TOKEN}"
|
||||
# "${CI_PROJECT_PATH}/build"
|
||||
# "${CI_BUILD_REF}"
|
||||
|
@ -13,7 +13,7 @@ cached_image="${3:-}"
|
||||
|
||||
base_image="tezos/opam:alpine-${alpine_version}_ocaml-${ocaml_version}"
|
||||
if ! docker pull "$base_image" ; then
|
||||
./create_docker_image.alpine.sh
|
||||
./scripts/create_docker_image.alpine.sh
|
||||
fi
|
||||
|
||||
cleanup () {
|
||||
@ -59,7 +59,7 @@ echo
|
||||
|
||||
if [ ! -z "$cached_image" ]; then
|
||||
echo
|
||||
echo "### Saving socker image ($cached_image)..."
|
||||
echo "### Saving docker image ($cached_image)..."
|
||||
echo
|
||||
docker tag "$image_name:$image_version" \
|
||||
"$cached_image:$dependencies_sha1"
|
||||
|
@ -22,11 +22,12 @@ getTagDigest() {
|
||||
local token=$1
|
||||
local reponame=$2
|
||||
local tag=$3
|
||||
local id=$(curl -s -H "Authorization: Bearer ${token}" \
|
||||
-D - -o /dev/null \
|
||||
local digest="$(curl -s -H "Authorization: Bearer ${token}" \
|
||||
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
--head \
|
||||
"${registry_uri}/${reponame}/manifests/${tag}" | \
|
||||
grep Docker-Content-Digest | tr -d '\r')
|
||||
echo -n "${id##Docker-Content-Digest: }"
|
||||
grep Docker-Content-Digest | tr -d '\r')"
|
||||
echo -n "${digest##Docker-Content-Digest: }"
|
||||
}
|
||||
|
||||
deleteDigest() {
|
||||
|
Loading…
Reference in New Issue
Block a user