Skip to content
Snippets Groups Projects
Commit 674bcaef authored by sandcha's avatar sandcha
Browse files

Tente de n'exécuter les jobs de CI que sur les runners taggués leximpact-shared-cache

parent 96e75260
Branches
Tags
1 merge request!39Fait des strates démographiques un paramètre
Pipeline #19558 failed
...@@ -6,13 +6,15 @@ stages: ...@@ -6,13 +6,15 @@ stages:
- build - build
- deploy - deploy
# get a cache before each stage
cache: cache:
untracked: true
# In key name, include Docker image to explicit Python version. Ref slug for branch or tag name. # In key name, include Docker image to explicit Python version. Ref slug for branch or tag name.
key: cache-${CI_JOB_IMAGE}-${CI_COMMIT_REF_SLUG} key: cache-${CI_JOB_IMAGE}-${CI_COMMIT_REF_SLUG}
paths: paths:
- .venv/ - .venv/
- ./dist - ./dist
# add the untracked files to the cache.zip
untracked: true
before_script: before_script:
...@@ -23,6 +25,9 @@ dependencies: ...@@ -23,6 +25,9 @@ dependencies:
# Prevent call of before_script because it will fail # Prevent call of before_script because it will fail
before_script: before_script:
- '' - ''
tags:
# run only on runners automatically sharing cache (with 'leximpact-shared-cache' tag)
- leximpact-shared-cache
script: script:
- python -m venv .venv - python -m venv .venv
- source .venv/bin/activate - source .venv/bin/activate
...@@ -31,12 +36,16 @@ dependencies: ...@@ -31,12 +36,16 @@ dependencies:
check-style: check-style:
stage: test stage: test
needs: ["dependencies"] needs: ["dependencies"]
tags:
- leximpact-shared-cache
script: script:
- make check-style - make check-style
test: test:
stage: test stage: test
needs: ["dependencies"] needs: ["dependencies"]
tags:
- leximpact-shared-cache
script: script:
- make test-ci - make test-ci
...@@ -57,6 +66,7 @@ validate_yaml: ...@@ -57,6 +66,7 @@ validate_yaml:
check_version: check_version:
stage: test stage: test
# TODO check if this job really needs "dependencies" and explicit why
needs: ["dependencies"] needs: ["dependencies"]
script: script:
# Check for functional changes and version number # Check for functional changes and version number
...@@ -66,6 +76,8 @@ check_version: ...@@ -66,6 +76,8 @@ check_version:
build: build:
stage: build stage: build
tags:
- leximpact-shared-cache
script: script:
- make build - make build
...@@ -73,6 +85,8 @@ build: ...@@ -73,6 +85,8 @@ build:
# release needed to bypass 'git tag' access rights configuration limited by annual token # release needed to bypass 'git tag' access rights configuration limited by annual token
release-and-tag: release-and-tag:
stage: deploy stage: deploy
tags:
- leximpact-shared-cache
needs: ["build"] needs: ["build"]
# use release-cli to get release name from variable # use release-cli to get release name from variable
image: registry.gitlab.com/gitlab-org/release-cli:latest image: registry.gitlab.com/gitlab-org/release-cli:latest
...@@ -93,6 +107,8 @@ release-and-tag: ...@@ -93,6 +107,8 @@ release-and-tag:
deploy-wheel: deploy-wheel:
stage: deploy stage: deploy
needs: ["build"] needs: ["build"]
tags:
- leximpact-shared-cache
script: script:
- if ! .gitlab/ci/has-functional-changes.sh ; then exit 0 ; fi - if ! .gitlab/ci/has-functional-changes.sh ; then exit 0 ; fi
# publish the wheel knowing that artifacts from all previous stages are passed by default # publish the wheel knowing that artifacts from all previous stages are passed by default
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment