Commit 36ec618f authored by Carlo Landmeter's avatar Carlo Landmeter

create manifest based of arch filename

parent 1b1e1be3
Pipeline #4869 passed with stage
in 35 seconds
......@@ -17,7 +17,7 @@ stages:
- mkdir -p docker-images
- >
docker image save $CI_PROJECT_NAME:latest-$ARCH | pigz >
docker-images/${CI_PROJECT_NAME}_latest-${ARCH}.tar.gz
docker-images/${ARCH}.tar.gz
artifacts:
paths:
- docker-images/*.tar.gz
......@@ -119,7 +119,7 @@ build-armv7:
- tags
before_script:
- *docker-login
- unpigz -c docker-images/${CI_PROJECT_NAME}_latest-${ARCH}.tar.gz | docker image load
- unpigz -c docker-images/${ARCH}.tar.gz | docker image load
script:
- >
docker-push-image
......@@ -242,24 +242,12 @@ create-manifest:
- *docker-login
- for image in docker-images/*.tar.gz; do unpigz -c "$image" | docker image load; done
script:
- >
docker-push-manifest $DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest
$DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest-
s390x
x86_64
x86
ppc64le
aarch64
armv7
- >
if [ -n "$CI_COMMIT_TAG" ]; then
docker-push-manifest $DOCKER_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG
$DOCKER_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG-
s390x
x86_64
x86
ppc64le
aarch64
armv7
;
fi
- arches=$(ls docker-images | xargs -I%% basename %% .tar.gz)
- images=$(printf -- "$DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest-%s " $arches)
- docker manifest create --amend "$DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest" $images
- docker manifest push --purge "$DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest"
- if [ "$CI_COMMIT_TAG" ]; then
- docker manifest create --amend "$DOCKER_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG" $images
- docker manifest push --purge "$DOCKER_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG"
- fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment