Commit 38d57514 authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

ci: smarter ci pipeline with only:changes key

parent 5ca5a1c8
......@@ -17,13 +17,16 @@ build:
stage: build
script:
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" registry-gitlab.pasteur.fr
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
- docker build --pull -t "$CI_REGISTRY_IMAGE:latest" .
- docker push "$CI_REGISTRY_IMAGE:latest"
only:
- master
changes:
- Dockerfile
- package.json
- setup.py
pytest:
image: registry-gitlab.pasteur.fr/bis-aria/ariaec:$CI_COMMIT_REF_NAME
image: $CI_REGISTRY_IMAGE:latest
stage: test
script:
- cd ${CI_PROJECT_DIR}
......@@ -32,7 +35,7 @@ pytest:
coverage:
stage: coverage
image: registry-gitlab.pasteur.fr/bis-aria/ariaec:$CI_BUILD_REF_NAME
image: $CI_REGISTRY_IMAGE:latest
script:
- pytest --cov=aria --cov-report html --cov-report term
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
......@@ -40,10 +43,13 @@ coverage:
paths:
- htmlcov/
only:
- master
refs:
- master
changes:
- src/**/*
pages:
image: registry-gitlab.pasteur.fr/bis-aria/ariaec:$CI_BUILD_REF_NAME
image: $CI_REGISTRY_IMAGE:latest
stage: deploy
dependencies:
- coverage
......@@ -57,7 +63,10 @@ pages:
paths:
- public
only:
- master
refs:
- master
changes:
- docs/**/*
cleanup_pypirc:
stage: cleanup
......
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