Commit 74385ea9 authored by Aliaksandr Ramanovich (EPAM)'s avatar Aliaksandr Ramanovich (EPAM)
Browse files

Pipeline for deploy services in gcp cloudrun

parent 9e1a89eb
Pipeline #4455 passed with stage
in 6 seconds
# Copyright 2020 Google LLC
# Copyright 2017-2019, Schlumberger
# Copyright 2020 EPAM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.osdu_variables:
variables:
OSDU_INTEGRATION_TESTER: $EPAM_GCP_INTEGRATION_TESTER # $OSDU_GCP_INTEGRATION_TESTER
OSDU_NO_DATA_ACCESS_TESTER: $EPAM_GCP_NO_DATA_ACCESS_TESTER # $OSDU_GCP_NO_DATA_ACCESS_TESTER
OSDU_STORAGE_URL: https://os-storage-dot-nice-etching-277309.uc.r.appspot.com/api/storage/v2/
OSDU_DEPLOY_ENV: dev
OSDU_DOMAIN: osdu-gcp.go3-nrg.projects.epam.com
OSDU_TENANT_NAME: osdu
OSDU_AUTHORIZE_API: https://os-entitlements-gcp-attcrcktoa-uc.a.run.app/entitlements/v1/
OSDU_MY_TENANT_PROJECT: osdu
OSDU_LEGAL_HOST_URL: https://os-legal-dot-nice-etching-277309.uc.r.appspot.com/api/legal/v1/
OSDU_INTEGRATION_TEST_AUDIENCE: 689762842995-pv217jo3k8j803kk6gqf52qb5amos3a9.apps.googleusercontent.com
OSDU_MY_TENANT: osdu
OSDU_ENTITLEMENT_URL: https://os-entitlements-gcp-attcrcktoa-uc.a.run.app/entitlements/v1/
OSDU_CLOUDRUN_REGION: us-central1
package_docker_image:
needs:
- job: build_jar
artifacts: true
stage: Containerize
image: google/cloud-sdk
cache: {}
script:
- gcloud auth activate-service-account --key-file $EPAM_GCP_DEPLOY_FILE # $OSDU_GCP_DEPLOY_FILE
- gcloud config set project $OSDU_PROJECT
- touch .gcloudignore
- gcloud builds submit --config provider/$OSDU_SERVICE-$OSDU_VENDOR/cloudbuild/cloudbuild.yaml --substitutions=_PROVIDER_NAME=$OSDU_VENDOR,_SHORT_SHA=$CI_COMMIT_SHORT_SHA,_PORT=$PORT
deploy_osdu:
image: google/cloud-sdk
stage: Deploy
cache: {}
environment:
name: dev
url: https://$OSDU_APPLICATION_NAME-jvmvia5dea-uc.a.run.app
script:
- gcloud auth activate-service-account --key-file $EPAM_GCP_DEPLOY_FILE # $OSDU_GCP_DEPLOY_FILE
- gcloud config set project $OSDU_PROJECT
- gcloud beta run deploy $OSDU_APPLICATION_NAME --image gcr.io/$OSDU_PROJECT/$OSDU_APPLICATION_NAME/$OSDU_SERVICE-$OSDU_VENDOR:$CI_COMMIT_SHORT_SHA --platform managed --region $OSDU_CLOUDRUN_REGION --allow-unauthenticated --service-account $OSDU_SERVICE_ACCOUNT --memory 512M --set-env-vars=$OSDU_ENV_VARS
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