Commit 328914f8 authored by Kevin Daudt's avatar Kevin Daudt

merge: let gitlab-ci persist build artifact for following stages

See merge request !4
parents fc891864 27a09cd0
Pipeline #226 passed with stage
in 26 seconds
......@@ -9,9 +9,18 @@ stages:
stage: build
script:
- docker build -t $CI_PROJECT_NAME:latest-$ARCH .
after_script:
- mkdir -p docker-images
- >
docker image save $CI_PROJECT_NAME:latest-$ARCH | gzip - >
docker-images/${CI_PROJECT_NAME}_latest-${ARCH}.tar.gz
artifacts:
paths:
- docker-images/*.tar.gz
expire_in: 1h
.build_with_arch:
stage: build
extends: .build
script:
- docker build --build-arg ARCH=$DOCKER_ARCH/ -t $CI_PROJECT_NAME:latest-$ARCH .
......@@ -50,6 +59,7 @@ build-x86:
- tags
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- gunzip -c docker-images/${CI_PROJECT_NAME}_latest-${ARCH}.tar.gz | docker image load
script:
- >
docker-push-image
......@@ -97,6 +107,7 @@ create-manifest:
- docker-alpine
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- for image in docker-images/*.tar.gz; do gunzip -c "$image" | docker image load; done
script:
- >
docker-push-manifest $DOCKER_NAMESPACE/$CI_PROJECT_NAME:latest
......
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