diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8ade1f..a06ae6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,10 @@ stages: - push -variables: - K3S_VERSION: 1.28.3 - push:staging: stage: push - image: alpine/k8s:$K3S_VERSION + image: alpine/git variables: - KUBE_CONTEXT: ldc-web/cluster-k8s:k8s-ldc-web DEPLOY_BRANCH: deploy/staging ENV: $ENV_STAGING rules: @@ -16,33 +12,11 @@ push:staging: when: manual - when: never before_script: - - apk update && apk add gettext git + - apk update && apk add gettext script: - export $(cat $ENV | xargs) - - echo "Update namespaces" - - | - for namespace in namespaces/*.yaml; - do envsubst < $namespace > $namespace.tmp; - mv $namespace.tmp $namespace; - done - - echo "Update manifests" - - | - for svc in manifests/common-services/*/*.yaml; - do envsubst < $svc > $svc.tmp; mv $svc.tmp $svc; - done - - echo "Deploy secrets" - - | - for secret in secrets/*.yaml; - do envsubst < $secret | kubectl apply -f -; - done - - echo "Deploy values ConfigMaps" - - | - for val in values/*.yaml; - do envsubst < $val > $val.tmp; - kubectl create configmap -n manifests/common-services $(basename "${val%.*}")-values -o yaml --dry-run=client --from-file=$val.tmp | kubectl apply -f -; - rm $val.tmp; - done - - echo "Pushing updated manifests in ${} branch" + - for namespace in namespaces/*.yaml; do envsubst < $namespace > $namespace.tmp; mv $namespace.tmp $namespace; done + - for svc in manifests/common-services/*/*.yaml; do envsubst < $svc > $svc.tmp; mv $svc.tmp $svc; done - | git config user.name "Bot Auto Deploy" git config user.email "autodeploy@mediactivegroup.com" diff --git a/manifests/common-services/gitlab-agent/release.yaml b/manifests/common-services/gitlab-agent/release.yaml index 327991d..ac70d2a 100644 --- a/manifests/common-services/gitlab-agent/release.yaml +++ b/manifests/common-services/gitlab-agent/release.yaml @@ -24,6 +24,8 @@ spec: name: gitlab-agent namespace: common-services values: + image: + tag: "${GITLAB_AGENT_VERSION}" config: kasAddress: "wss://lab.s-web.fr/-/kubernetes-agent/" secretName: gitlab-agent-token