Skip to content
Snippets Groups Projects
Commit bd632aa5 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'prevent-blocked-base-build' into 'master'

Allow CI jobs using the base image to fail on a base build

See merge request !911
parents d90d3fa0 3288b32e
No related branches found
No related tags found
1 merge request!911Allow CI jobs using the base image to fail on a base build
image: registry.gitlab.com/arkindex/backend/base:django-3.1.1
stages:
- test
- build
- deploy
# GitLab provides a template to ensure pipelines run only for branches and tags, not for merge requests
# This prevents duplicate pipelines in merge requests.
# See https://docs.gitlab.com/ee/ci/troubleshooting.html#job-may-allow-multiple-pipelines-to-run-for-a-single-action
include:
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
# For jobs that run backend scripts directly
.backend-setup:
image: registry.gitlab.com/arkindex/backend/base:django-3.1.1
cache:
paths:
- .cache/pip
......@@ -19,6 +25,13 @@ stages:
- pip install -r tests-requirements.txt codecov
- "echo 'database: {host: postgres, port: 5432}' > $CONFIG_PATH"
# Those jobs require the base image; they might fail if the image is not up to date.
# Allow them to fail when building a new base image, to prevent them from blocking a new base image build
rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^base-.*/'
allow_failure: true
- when: on_success
variables:
# For the postgres image
POSTGRES_DB: arkindex_dev
......@@ -154,6 +167,7 @@ backend-build-binary:
backend-static-deploy:
stage: deploy
image: python:3-slim
# Run this on any version tag except base images
rules:
......@@ -174,6 +188,7 @@ backend-static-deploy:
backend-openapi-deploy:
stage: deploy
image: python:3-slim
# Run on master updates only
only:
......@@ -190,8 +205,8 @@ backend-openapi-deploy:
- aws s3 cp output/schema.yml s3://teklia-assets-release/arkindex/openapi.yml
sentry-release:
image: getsentry/sentry-cli
stage: deploy
image: getsentry/sentry-cli
rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG !~ /^base-.*/'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment