Skip to content
Snippets Groups Projects
Commit 06995f40 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-6588_job_that_deploy_services_to_preship_for_release_pipeline' into 'master'

ci: manual job that deploy services to preship for release pipeline

See merge request !662
parents 1aa846be c6f4fc4f
No related branches found
No related tags found
1 merge request!662ci: manual job that deploy services to preship for release pipeline
Pipeline #172873 failed
......@@ -99,6 +99,29 @@ sdms-gc-dev2-deploy:
- devops/**/*
- app/sdms/**/*
sdms-gc-preship-deploy:
extends: .gc-preship-deploy
needs: ["sdms-gc-dev2-deploy"]
variables:
SEISMIC_GC_HELM_DEPLOYMENT_SERVICE: seismic-store-deploy
SEISMIC_GC_HELM_DEPLOYMENT_DIR: "app/sdms/devops/gc/deploy"
SEISMIC_GC_SERVICE: seismic-store
SEISMIC_GC_CHART: gc-seismic-store-sdms-deploy #var used only in release and tagged pipelines
IMAGE_NAME: gc-$SEISMIC_GC_SERVICE
rules:
- if: '$GC == "1" && $CI_COMMIT_TAG'
when: manual
changes:
- devops/**/*
- app/sdms/**/*
allow_failure: true
- if: '$GC == "1" && $CI_COMMIT_BRANCH =~ /^release/'
when: manual
changes:
- devops/**/*
- app/sdms/**/*
allow_failure: true
sdms-gc-anthos-deploy:
extends: .gc-anthos-deploy
needs: ["sdms-gc-containerize-gitlab"]
......
......@@ -16,6 +16,15 @@
- gcloud container clusters get-credentials $GC_CLUSTER --zone $GC_ZONE --project $GC_PROJECT
- curl https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz -s -o helm.tgz; tar -zxf helm.tgz; mv linux-amd64/helm /usr/local/bin/
.common-preship:
script:
- gcloud auth activate-service-account --key-file $GC_PRESHIP_DEPLOY_FILE
- gcloud config set project $GC_PROJECT
- gcloud components install kubectl --quiet
- export USE_GKE_GCLOUD_AUTH_PLUGIN=True
- gcloud container clusters get-credentials $GC_CLUSTER --zone $GC_ZONE --project $GC_PROJECT
- curl https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz -s -o helm.tgz; tar -zxf helm.tgz; mv linux-amd64/helm /usr/local/bin/
.common-anthos:
script:
- gcloud auth activate-service-account --key-file $GC_ANTHOS_DEPLOY_FILE
......@@ -74,7 +83,7 @@
.set_image_name:
script:
- >
if echo $CI_COMMIT_REF_NAME | grep -Eq "release";
if echo $CI_COMMIT_REF_NAME | grep -Eq "^release\/[0-9]{1,2}.[0-9]{1,2}$";
then
export IMAGE_NAME=$IMAGE_NAME-release;
fi;
......@@ -209,6 +218,36 @@
- if: '$GC == "1" && $CI_COMMIT_TAG'
when: on_success
.gc-preship-deploy:
stage: deploy_preship
retry: 1
tags: ["osdu-small"]
extends: .gc-preship-variables
image: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
script:
- !reference [.common-preship, script]
- !reference [.define_VER, script]
- !reference [.set_image_name, script]
- helm repo add $SEISMIC_GC_SERVICE ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
- >
helm upgrade $SEISMIC_GC_HELM_DEPLOYMENT_SERVICE $SEISMIC_GC_HELM_DEPLOYMENT_DIR --version $VER
--install
--create-namespace
--namespace=$GC_HELM_NAMESPACE
--wait
--history-max=3
--set data.image=$CI_REGISTRY_IMAGE/$IMAGE_NAME:${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
--set data.imagePullPolicy=Always
--set data.serviceAccountName=$SEISMIC_GC_SERVICE-k8s
- !reference [.verify_deploy, script]
rules:
- if: '$GC == "1" && $CI_COMMIT_TAG'
when: manual
allow_failure: true
- if: '$GC == "1" && $CI_COMMIT_BRANCH =~ /^release/'
when: manual
allow_failure: true
.gc-anthos-deploy:
stage: deploy
retry: 1
......
......@@ -11,4 +11,8 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/gc-anthos-variables.yml"
# preship
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/gc-preship-variables.yml"
- local: "devops/osdu/cloud-providers/gc-common-pipeline.yml"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment