Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
3288b32e
Commit
3288b32e
authored
4 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Allow CI jobs using the base image to fail on a base build
parent
d90d3fa0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+17
-2
17 additions, 2 deletions
.gitlab-ci.yml
with
17 additions
and
2 deletions
.gitlab-ci.yml
+
17
−
2
View file @
3288b32e
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-.*/'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment