Skip to content
Snippets Groups Projects
Commit cb5e126e authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

add emoji to ci tasks

parent 5f40d782
No related branches found
No related tags found
1 merge request!244add emoji to ci tasks
image: docker:24
build:
stages:
- "📦 build"
- "🩺 test"
- "🚀 deploy"
- "🔧 configure"
"🐳 build":
needs: []
stage: build
stage: "📦 build"
variables:
RUN_TEST: "1"
POSTGRES_HOST: "db-test"
......@@ -59,9 +67,9 @@ build:
test-file-perms:
stage: test
needs: ["build"]
"🩺 test-file-perms":
stage: "🩺 test"
needs: ["🐳 build"]
variables:
FILEPATH_TO_TEST: "/code/manage.py"
PATH_TAG: "app"
......@@ -81,8 +89,8 @@ test-file-perms:
.deploy:
needs: ["build", "tailored-doc"]
stage: deploy
needs: ["🐳 build", "📝 tailored-doc"]
stage: "🚀 deploy"
image: harbor.pasteur.fr/kube-system/helm-kubectl:3.13.3
variables:
CI_DEBUG_TRACE: "false"
......@@ -93,7 +101,7 @@ test-file-perms:
environment:
name: "k8sdev-01-strass-dev/$CI_COMMIT_REF_SLUG"
url: "https://strass-${CI_COMMIT_REF_SLUG}.dev.pasteur.cloud"
on_stop: stop_and_delete_in_dev
on_stop: "💥 stop_and_delete_in_dev"
script:
- kubectl delete secret registry-gitlab -n $NAMESPACE --ignore-not-found=true
- kubectl create secret docker-registry -n $NAMESPACE registry-gitlab --docker-server=$CI_REGISTRY --docker-username=$DEPLOY_USER --docker-password=$DEPLOY_TOKEN --docker-email=$GITLAB_USER_EMAIL
......@@ -123,7 +131,7 @@ test-file-perms:
deploy_dev:
"🚀 deploy_dev":
extends: .deploy
except:
variables:
......@@ -131,8 +139,12 @@ deploy_dev:
deploy_prod:
"🚀 deploy_prod":
extends: .deploy
needs:
- "🐳 build"
- "📝 tailored-doc"
- "💯 checkCoverageMasterOrProd"
only:
variables:
- $CI_COMMIT_REF_SLUG =~ /-prod$/
......@@ -144,32 +156,34 @@ deploy_prod:
environment:
name: "k8sprod-02/strass-prod/$CI_COMMIT_REF_SLUG"
url: "https://${CI_COMMIT_REF_SLUG::-5}.pasteur.cloud"
on_stop: stop_and_delete_in_prod
on_stop: "❗💥 stop_and_delete_in_prod"
before_script:
- export REL_NAME="${CI_COMMIT_REF_SLUG::-5}"
open_public_access:
needs: ["deploy_prod"]
"🔓🌐 open_public_access":
needs: ["🚀 deploy_prod"]
stage: "🔧 configure"
when: manual
extends: deploy_prod
extends: "🚀 deploy_prod"
variables:
PUBLICLY_OPEN: "true"
close_public_access:
needs: ["deploy_prod"]
"🔒🌐 close_public_access":
needs: ["🚀 deploy_prod"]
stage: "🔧 configure"
when: manual
extends: deploy_prod
extends: "🚀 deploy_prod"
variables:
PUBLICLY_OPEN: "false"
.stop_and_delete:
stage: deploy
stage: "🔧 configure"
when: manual
image: harbor.pasteur.fr/kube-system/helm-kubectl:3.13.3
variables:
......@@ -186,8 +200,8 @@ close_public_access:
stop_and_delete_in_dev:
needs: ["deploy_dev"]
"💥 stop_and_delete_in_dev":
needs: ["🚀 deploy_dev"]
extends: .stop_and_delete
except:
variables:
......@@ -195,13 +209,13 @@ stop_and_delete_in_dev:
stop_and_delete_in_prod:
needs: ["deploy_prod"]
"❗💥 stop_and_delete_in_prod":
needs: ["🚀 deploy_prod"]
extends: .stop_and_delete
only:
variables:
- $CI_COMMIT_REF_SLUG =~ /-prod$/
stage: deploy
stage: "🔧 configure"
when: manual
variables:
GIT_STRATEGY: none # important to not checkout source when branch is deleted
......@@ -217,10 +231,10 @@ stop_and_delete_in_prod:
build_pages:
"📝 build_pages":
needs: []
image: python:3.11
stage: build
stage: "📦 build"
script:
- pip install -r doc/requirements.txt
- cd doc
......@@ -233,8 +247,8 @@ build_pages:
pages:
needs: [build_pages]
stage: build
needs: ["📝 build_pages"]
stage: "📦 build"
script:
- ls -lah
artifacts:
......@@ -245,9 +259,9 @@ pages:
tailored-doc:
needs: [build_pages]
stage: build
"📝 tailored-doc":
needs: ["📝 build_pages"]
stage: "📦 build"
before_script:
- i=0; while [ "$i" -lt 60 ]; do docker info && break; sleep 1; i=$(( i + 1 )) ; done
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
......@@ -282,10 +296,10 @@ tailored-doc:
black:
"🎨 black":
needs: []
image: python:3.11
stage: build
stage: "📦 build"
script:
- python -m pip install --upgrade pip
- cd src/strass/
......@@ -296,7 +310,8 @@ black:
# credits https://rpadovani.com/gitlab-code-coverage
.checkCoverage:
needs: ["build"]
needs: ["🐳 build"]
stage: "🩺 test"
image: alpine:latest
variables:
JOB_NAME: build
......@@ -312,28 +327,25 @@ black:
- if [ "$CURRENT_COVERAGE" -lt "$TARGET_COVERAGE" ]; then echo "Coverage decreased from ${TARGET_COVERAGE} to ${CURRENT_COVERAGE}" && exit 1; fi;
checkCoverageMasterOrProd:
"💯 checkCoverageMasterOrProd":
extends: .checkCoverage
only:
variables:
- $CI_COMMIT_REF_SLUG =~ /-prod$/
- $CI_COMMIT_REF_SLUG == "master"
stage: test
checkCoverageOther:
"💯 checkCoverageOther":
extends: .checkCoverage
except:
variables:
- $CI_COMMIT_REF_SLUG =~ /-prod$/
- $CI_COMMIT_REF_SLUG == "master"
stage: deploy
test-migrations-and-lang-ar-up-to-date:
stage: test
"🩺 test-migrations-and-lang-ar-up-to-date":
stage: "🩺 test"
needs: []
image: python:3.11
variables:
......@@ -354,9 +366,9 @@ test-migrations-and-lang-ar-up-to-date:
ssi-test:
needs: ["build"]
needs: ["🐳 build"]
when: manual
stage: test
stage: "🩺 test"
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
cache:
......
doc/_static/merge-request-pipelines-all-cut-dev.png

71.9 KiB

doc/_static/merge-request-pipelines-all-cut.png

75.9 KiB

doc/_static/merge-request-pipelines-all.png

103 KiB

doc/_static/merge-request-pipelines-delete-dev.png

30.9 KiB | W: | H:

doc/_static/merge-request-pipelines-delete-dev.png

13.6 KiB | W: | H:

doc/_static/merge-request-pipelines-delete-dev.png
doc/_static/merge-request-pipelines-delete-dev.png
doc/_static/merge-request-pipelines-delete-dev.png
doc/_static/merge-request-pipelines-delete-dev.png
  • 2-up
  • Swipe
  • Onion skin
doc/_static/merge-request-pipelines-delete.png

22.2 KiB | W: | H:

doc/_static/merge-request-pipelines-delete.png

23.1 KiB | W: | H:

doc/_static/merge-request-pipelines-delete.png
doc/_static/merge-request-pipelines-delete.png
doc/_static/merge-request-pipelines-delete.png
doc/_static/merge-request-pipelines-delete.png
  • 2-up
  • Swipe
  • Onion skin
doc/_static/merge-request-pipelines.png

103 KiB | W: | H:

doc/_static/merge-request-pipelines.png

93.4 KiB | W: | H:

doc/_static/merge-request-pipelines.png
doc/_static/merge-request-pipelines.png
doc/_static/merge-request-pipelines.png
doc/_static/merge-request-pipelines.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -78,8 +78,9 @@ all pipelines are now green.
:alt: Pipelines all in green
On the right part, the third green checkmark (named A) allows you to see all job related to
the deployment of the instance. You see the `deploy_prod` went well. To open the public access just click on the play
On the right part, the fourth circle (named A) allows you to see all job related to
the deployment of the instance.
To open the public access just click on the play
button next to `open_public_access` (named B) and wait for the job completion.
Similarly, to close the public access juste click on the play
button next to `close_public_access` (named C) and wait for the job completion.
......
......@@ -48,14 +48,16 @@ Load the demo ?
-------------------------------------------------------------------------------
You can load the demo, but you need kubectl installed, and you need to be granted on the dev namespace.
If you understand this requirementsadd, then see :ref:`load_demo_k8s` on know how to load the demo in kubernetes
If you understand this requirements, then see :ref:`load_demo_k8s` on know how to load the demo in kubernetes
Stop it
-------------------------------------------------------------------------------
It is automatically done when you merge your branch, but If you just close it you need to stop it first.
In the pipelines (A), see the job "stop_and_delete_instance" (D)
.. image:: _static/merge-request-pipelines-all-cut.png
.. image:: _static/merge-request-pipelines-all-cut-dev.png
:width: 100%
:alt: Pipelines all in green
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment