Remove image caching as artifacts due to size limitations, introduce separate master / feature jobs instead
This commit is contained in:
parent
76027dea9c
commit
866bf7b552
@ -12,6 +12,10 @@ stages:
|
|||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
|
||||||
|
.docker_build: &docker_build
|
||||||
|
script:
|
||||||
|
- docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile .
|
||||||
|
|
||||||
.before_script: &before_script
|
.before_script: &before_script
|
||||||
before_script:
|
before_script:
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
@ -77,27 +81,23 @@ remote-repo-job:
|
|||||||
|
|
||||||
# Run a docker build on the ligo image, to see if the current
|
# Run a docker build on the ligo image, to see if the current
|
||||||
# commit does not break it
|
# commit does not break it
|
||||||
build-current-docker-image:
|
# build-current-docker-image:
|
||||||
stage: build
|
# stage: build
|
||||||
<<: *docker
|
# <<: *docker
|
||||||
script:
|
# <<: *docker_build
|
||||||
- docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile .
|
# except:
|
||||||
- docker save $LIGO_REGISTRY_IMAGE:latest > image
|
# - master
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- image
|
|
||||||
|
|
||||||
# When a MR/PR is merged to master
|
# When a MR/PR is merged to master
|
||||||
# take the previous build and publish it to Docker Hub
|
# take the previous build and publish it to Docker Hub
|
||||||
build-and-publish-latest-docker-image:
|
build-and-publish-latest-docker-image:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
<<: *docker
|
<<: *docker
|
||||||
|
<<: *docker_build
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-current-docker-image
|
- build-current-docker-image
|
||||||
before_script:
|
post_script:
|
||||||
- docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD
|
- docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD
|
||||||
script:
|
- docker push $LIGO_REGISTRY_IMAGE:latest
|
||||||
- docker load -i image
|
# only:
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
# - master
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
Loading…
Reference in New Issue
Block a user