Commit 21c7a05d authored by Aliaksandr Ramanovich (EPAM)'s avatar Aliaksandr Ramanovich (EPAM) Committed by Siarhei Khaletski (EPAM)
Browse files

OSDU-GCP add configs [GONRG-2596]

parent 2d6b7aa9
......@@ -30,6 +30,7 @@ variables:
stages:
- test
- containerize
- csp_containerize
- deploy
......@@ -55,9 +56,10 @@ build_base_image:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $BASE_IMAGE_TAG
when: manual
build_osdu_gcp_image:
stage: deploy
stage: csp_containerize
tags: ["osdu-medium"]
needs: ["build_base_image"]
script:
......@@ -69,12 +71,18 @@ build_osdu_gcp_image:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- echo ---- ---- PUSH IMAGE
- docker push $OSDU_GCP_IMAGE_TAG
- sed -i "s|IMAGE|$OSDU_GCP_IMAGE_TAG|" devops/osdu-gcp/airflow_configs.yaml
when: manual
artifacts:
when: always
paths:
- devops/osdu-gcp/airflow_configs.yaml
expire_in: 1 week
except:
- /^release\/*/
build_osdu_gcp_release_image:
stage: deploy
stage: csp_containerize
tags: ["osdu-medium"]
needs: ["build_base_image"]
variables:
......@@ -96,13 +104,17 @@ build_osdu_gcp_release_image:
osdu_gcp_dags_rsync:
image: gcr.io/google.com/cloudsdktool/cloud-sdk
stage: deploy
needs: [build_osdu_gcp_image]
script:
- gcloud auth activate-service-account --key-file $OSDU_GCP_DEPLOY_FILE
- gcloud config set project "$OSDU_GCP_PROJECT"
- cd "$SRCDIR"
- sed -i "s|KEY_PATH|$OSDU_GCP_KEY_PATH|" devops/osdu-gcp/airflow_configs.yaml
- pushd "$SRCDIR"
- ls
- echo *******
- gsutil -m rsync -d -R dags/"$VENDOR_NAME"/ "$OSDU_GCP_DEPL_TARGET"/dags/"$VENDOR_NAME"
- popd
- gsutil cp devops/osdu-gcp/airflow_configs.yaml "$OSDU_GCP_DEPL_TARGET"/dags/configs/
only:
variables:
- $CI_COMMIT_REF_PROTECTED
......@@ -111,13 +123,17 @@ osdu_gcp_dags_rsync:
osdu_gcp_dags_prod_rsync:
image: gcr.io/google.com/cloudsdktool/cloud-sdk
stage: deploy
needs: [build_osdu_gcp_image]
script:
- gcloud auth activate-service-account --key-file $OSDU_GCP_PROD_SVC_ACCT
- gcloud config set project "$OSDU_GCP_PROD_PROJECT"
- cd "$SRCDIR"
- sed -i "s|KEY_PATH|$OSDU_GCP_PROD_KEY_PATH|" devops/osdu-gcp/airflow_configs.yaml
- pushd "$SRCDIR"
- ls
- echo *******
- gsutil -m rsync -d -R dags/"$VENDOR_NAME"/ "$OSDU_GCP_DEPL_TARGET_PREPROD"/dags/"$VENDOR_NAME"
- popd
- gsutil cp devops/osdu-gcp/airflow_configs.yaml "$OSDU_GCP_DEPL_TARGET_PREPROD"/dags/configs/
only:
- /^release\/*/
when: manual
energistics:
energistics_witsml_parser_k8s_operator:
image: "IMAGE"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-nodepool
operator: In
values:
- pool-1
env_vars:
SA_FILE_PATH: "KEY_PATH"
resources:
request_memory: "1Gi"
request_cpu: 200m
limit_memory: 1Gi
limit_cpu: 1000m
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment