Commit ee61396c authored by ale's avatar ale

Switch to multi-stage Docker build

parent 5ddafef0
Pipeline #5073 failed with stages
in 43 seconds
image: docker:latest image: docker:latest
stages: stages:
- build
- docker_build - docker_build
- release - release
...@@ -13,24 +12,12 @@ variables: ...@@ -13,24 +12,12 @@ variables:
RELEASE_TAG: $CI_REGISTRY_IMAGE:latest RELEASE_TAG: $CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
build:
stage: build
image: "ai/build:stretch"
script:
- env DEBIAN_FRONTEND=noninteractive apt-get -qy install make golang-go
- make
artifacts:
paths:
- build/
docker_build: docker_build:
stage: docker_build stage: docker_build
script: script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
- docker build --build-arg ci_token=$CI_JOB_TOKEN --pull -t $IMAGE_TAG . - docker build --build-arg ci_token=$CI_JOB_TOKEN --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG - docker push $IMAGE_TAG
dependencies:
- build
release: release:
stage: release stage: release
......
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