mirror of
https://gitlab.opencode.de/bmi/opendesk/deployment/opendesk.git
synced 2025-12-06 15:31:38 +01:00
ci(gitlab): Deploy networkpolcies before all services to avoid race conditions
This commit is contained in:
committed by
Thorsten Roßner
parent
3be3564ec7
commit
a943ca9a3c
@@ -28,12 +28,13 @@ stages:
|
|||||||
- ".pre"
|
- ".pre"
|
||||||
- "scan"
|
- "scan"
|
||||||
- "automr"
|
- "automr"
|
||||||
- "lint"
|
|
||||||
- "env-cleanup"
|
- "env-cleanup"
|
||||||
- "env"
|
- "env"
|
||||||
|
- "pre-services-deploy"
|
||||||
- "basic-services-deploy"
|
- "basic-services-deploy"
|
||||||
- "component-deploy-stage-1"
|
- "component-deploy-stage-1"
|
||||||
- "component-deploy-stage-2"
|
- "component-deploy-stage-2"
|
||||||
|
- "lint"
|
||||||
- "tests"
|
- "tests"
|
||||||
- "env-stop"
|
- "env-stop"
|
||||||
- ".post"
|
- ".post"
|
||||||
@@ -161,7 +162,7 @@ variables:
|
|||||||
fi;
|
fi;
|
||||||
- >
|
- >
|
||||||
echo "Installing ${COMPONENT} into ${NAMESPACE} namespace as ${HELMFILE_ENVIRONMENT} environment on ${CLUSTER}"
|
echo "Installing ${COMPONENT} into ${NAMESPACE} namespace as ${HELMFILE_ENVIRONMENT} environment on ${CLUSTER}"
|
||||||
- "helmfile --namespace ${NAMESPACE} apply --suppress-diff"
|
- "helmfile --namespace ${NAMESPACE} apply --suppress-diff ${ADDITIONAL_ARGS}"
|
||||||
tags:
|
tags:
|
||||||
- "docker"
|
- "docker"
|
||||||
- "kubernetes"
|
- "kubernetes"
|
||||||
@@ -218,6 +219,19 @@ env-start:
|
|||||||
--dry-run=client -o yaml | kubectl apply -f -
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
stage: "env"
|
stage: "env"
|
||||||
|
|
||||||
|
policies-deploy:
|
||||||
|
stage: "pre-services-deploy"
|
||||||
|
extends: ".deploy-common"
|
||||||
|
rules:
|
||||||
|
- if: >
|
||||||
|
$CI_PIPELINE_SOURCE =~ "web|schedules|triggers" &&
|
||||||
|
$NAMESPACE =~ /.+/ &&
|
||||||
|
($DEPLOY_ALL_COMPONENTS != "no" || $DEPLOY_SERVICES != "no")
|
||||||
|
when: "on_success"
|
||||||
|
variables:
|
||||||
|
COMPONENT: "services"
|
||||||
|
ADDITIONAL_ARGS: "-l name=opendesk-otterize"
|
||||||
|
|
||||||
services-deploy:
|
services-deploy:
|
||||||
stage: "basic-services-deploy"
|
stage: "basic-services-deploy"
|
||||||
extends: ".deploy-common"
|
extends: ".deploy-common"
|
||||||
|
|||||||
Reference in New Issue
Block a user