[damned-lies] chore: reorganise ci/cd job stages
- From: Guillaume Bernard <gbernard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] chore: reorganise ci/cd job stages
- Date: Tue, 10 May 2022 08:30:02 +0000 (UTC)
commit a738dc603e7d9a3bfdfd16b497cb8328d397a7b0
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date: Mon May 9 15:06:23 2022 +0200
chore: reorganise ci/cd job stages
.gitlab-ci.yml | 55 +++++++++++++++++++++++++++++++++----------------------
1 file changed, 33 insertions(+), 22 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f13997dc..a90292bd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,15 @@
stages:
# Build all artefacts that are used in the following jobs
- pre_build
- # Build all artefacts that may be published or put to production
+ # Build all artefacts that may be published or put to production such as packages or containers
- build
- test
- # Pre deploy tasks such as building production images, etc.
+ # Pre deploy tasks such as building final production images, etc.
- pre_deploy
- - deploy
+ # Deploy to staging environment
+ - staging
+ # Deploy to production environment
+ - production
workflow:
rules:
@@ -30,9 +33,9 @@ variables:
# A job that runs on the runtime image (the one that is used the build the
# production container should inherit from this template.
.job-on-runtime-image:
- image: "${RUNTIME_IMAGE_NAME}"
- before_script:
- - pip install -r requirements.txt
+ image: "${RUNTIME_IMAGE_NAME}"
+ before_script:
+ - pip install -r requirements.txt
# A job that builds an image using buildah should inherit from this template
@@ -133,6 +136,17 @@ package:
expire_in: 1 week
+build_container:staging:
+ extends: .build_damned_lies_image
+ stage: build
+ variables:
+ KIND_OF_DEPLOYMENT: "staging"
+ rules:
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ when: always
+ - when: never
+
+
##############################################################################
################### Test ###################
##############################################################################
@@ -219,26 +233,13 @@ code-string-changes:
- "${TRANSLATION_DIFF_PO_FILENAME}"
when: on_failure
-##############################################################################
-################### Pre Deploy ###################
-##############################################################################
-build_container:staging:
- extends: .build_damned_lies_image
- stage: build
- variables:
- KIND_OF_DEPLOYMENT: "staging"
- rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- when: always
- - when: never
-
##############################################################################
-################### Deploy ###################
+################### Pre Deploy ###################
##############################################################################
build_container:test:
extends: .build_damned_lies_image
- stage: deploy
+ stage: pre_deploy
variables:
KIND_OF_DEPLOYMENT: "test"
rules:
@@ -249,7 +250,7 @@ build_container:test:
build_container:production:
extends: .build_damned_lies_image
- stage: deploy
+ stage: pre_deploy
variables:
KIND_OF_DEPLOYMENT: "production"
DAMNED_LIES_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/damned-lies-production"
@@ -263,3 +264,13 @@ build_container:production:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- when: never
+
+
+##############################################################################
+################### Staging ###################
+##############################################################################
+
+
+##############################################################################
+################### Production ###################
+##############################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]