Dan Anglin
b75a5c1eea
The following changes are included in this commit: - add a pipeline for publishing the output CV to the master branch when a change has been committed to the master branch. - split the CI configuration into two files: one for the docker build pipeline and the other for the CV build pipeline.
45 lines
760 B
YAML
45 lines
760 B
YAML
---
|
|
.docker-dind-service:
|
|
services:
|
|
- docker:19.03.5-dind
|
|
|
|
.use-docker:
|
|
image: docker:19.03.5
|
|
|
|
.install-deps: &install-deps
|
|
- apk add --no-cache make
|
|
|
|
test:docker-image:
|
|
extends:
|
|
- .docker-dind-service
|
|
- .use-docker
|
|
script:
|
|
- *install-deps
|
|
- make image
|
|
stage: test
|
|
only:
|
|
refs:
|
|
- merge_requests
|
|
changes:
|
|
- docker/Dockerfile
|
|
except:
|
|
refs:
|
|
- master
|
|
|
|
publish:docker-image:
|
|
extends:
|
|
- .use-docker
|
|
- .docker-dind-service
|
|
before_script:
|
|
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
|
|
after_script:
|
|
- docker logout ${CI_REGISTRY}
|
|
script:
|
|
- *install-deps
|
|
- make publish
|
|
stage: publish
|
|
only:
|
|
changes:
|
|
- docker/Dockerfile
|
|
refs:
|
|
- master@dananglin/cv
|