Commit f0637101 authored by Dmitriy Rudko's avatar Dmitriy Rudko 💬
Browse files

Merge branch 'epam-gcp' into 'master'

Add osdu-gcp cloud provider pipiline (GONRG-142)

See merge request !31
parents df62655d fd030158
Pipeline #7890 passed with stages
in 14 seconds
.OSDU_GCP_variables:
variables:
OSDU_GCP_INTEGRATION_TESTER: $OSDU_GCP_INTEGRATION_TESTER
OSDU_GCP_NO_DATA_ACCESS_TESTER: $OSDU_GCP_NO_DATA_ACCESS_TESTER
OSDU_GCP_PUBSUB_TOKEN: $OSDU_GCP_PUBSUB_TOKEN
OSDU_GCP_STORAGE_URL: https://os-storage-dot-nice-etching-277309.uc.r.appspot.com/api/storage/v2/
OSDU_GCP_DEPLOY_ENV: empty
OSDU_GCP_DOMAIN: osdu-gcp.go3-nrg.projects.epam.com
OSDU_GCP_TENANT_NAME: osdu
#Old OSDU_GCP_AUTHORIZE_API: https://entitlements-dot-nice-etching-277309.uc.r.appspot.com/entitlements/v1/
OSDU_GCP_AUTHORIZE_API: https://os-entitlements-gcp-attcrcktoa-uc.a.run.app/entitlements/v1
OSDU_GCP_MY_TENANT_PROJECT: osdu
OSDU_GCP_LEGAL_HOST_URL: https://os-legal-dot-nice-etching-277309.uc.r.appspot.com/api/legal/v1/
OSDU_GCP_INTEGRATION_TEST_AUDIENCE: 689762842995-pv217jo3k8j803kk6gqf52qb5amos3a9.apps.googleusercontent.com
OSDU_GCP_MY_TENANT: osdu
#Old OSDU_GCP_ENTITLEMENT_URL: https://entitlements-dot-nice-etching-277309.uc.r.appspot.com/entitlements/v1/
OSDU_GCP_ENTITLEMENT_URL: https://os-entitlements-gcp-attcrcktoa-uc.a.run.app/entitlements/v1
OSDU_GCP_VENDOR: gcp
OSDU_GCP_PROJECT: nice-etching-277309
.osdu-gcp:
tags: ["osdu-medium"]
image: google/cloud-sdk
only:
variables:
- $OSDU_GCP_BUILD_SUBDIR && $OSDU_GCP_INT_TEST_SUBDIR && $OSDU_GCP_APPLICATION_NAME && $OSDU_GCP_ENVIRONMENT && $OSDU_GCP_PROJECT && $OSDU_GCP_DEPLOY_FILE
variables:
OSDU_GCP_DEPLOY_DIR: OSDU_GCP_deploy_dir
before_script:
- mkdir -p "$OSDU_GCP_DEPLOY_DIR"
- gcloud auth activate-service-account --key-file="$OSDU_GCP_DEPLOY_FILE"
osdu-gcp-deploy:
extends: .osdu-gcp
stage: deploy
needs: ["compile-and-unit-test"]
script:
- cat $OSDU_GCP_APP_YAML > $OSDU_GCP_DEPLOY_DIR/app.yaml
- cp -v "${OSDU_GCP_BUILD_SUBDIR}"/target/*-spring-boot.jar "$OSDU_GCP_DEPLOY_DIR"
- cd "$OSDU_GCP_DEPLOY_DIR"
- echo --version="$CI_COMMIT_SHORT_SHA" --project="$OSDU_GCP_PROJECT" app.yaml
- gcloud auth list
- gcloud app deploy --quiet --version="$CI_COMMIT_SHORT_SHA" --project="$OSDU_GCP_PROJECT" app.yaml
only:
variables:
- $OSDU_GCP == 'true'
osdu-gcp-test:
extends:
- .osdu-gcp
- .maven
- .OSDU_GCP_variables
stage: integration
needs: ["osdu-gcp-deploy"]
script:
- cd $OSDU_GCP_INT_TEST_SUBDIR
- echo $OSDU_GCP_DEPLOY_ENV $DEPLOY_ENV
- |
$MAVEN test \
-DINTEGRATION_TESTER=${OSDU_GCP_INTEGRATION_TESTER} \
-DNO_DATA_ACCESS_TESTER=${OSDU_GCP_NO_DATA_ACCESS_TESTER} \
-DPUBSUB_TOKEN=${OSDU_GCP_PUBSUB_TOKEN} \
-DSTORAGE_URL=${OSDU_GCP_STORAGE_URL} \
-DDEPLOY_ENV=${OSDU_GCP_DEPLOY_ENV} \
-DDOMAIN=${OSDU_GCP_DOMAIN} \
-DTENANT_NAME=${OSDU_GCP_TENANT_NAME} \
-DAUTHORIZE_API=${OSDU_GCP_AUTHORIZE_API} \
-DMY_TENANT_PROJECT=${OSDU_GCP_MY_TENANT_PROJECT} \
-DHOST_URL=${OSDU_GCP_LEGAL_HOST_URL} \
-DINTEGRATION_TEST_AUDIENCE=${OSDU_GCP_INTEGRATION_TEST_AUDIENCE} \
-DMY_TENANT=${OSDU_GCP_MY_TENANT} \
-DENTITLEMENT_URL=${OSDU_GCP_ENTITLEMENT_URL} \
-DGCLOUD_PROJECT=${OSDU_GCP_MY_TENANT_PROJECT} \
-DENVIRONMENT=${OSDU_GCP_DEPLOY_ENV} \
-DSTORAGE_URL=${OSDU_GCP_STORAGE_URL} \
-DINT_TEST_VENDOR=${OSDU_GCP_VENDOR} \
-DTENANT_GCP=${OSDU_GCP_MY_TENANT_PROJECT} \
-DLEGAL_URL=${OSDU_GCP_LEGAL_HOST_URL}
only:
variables:
- $OSDU_GCP == 'true'
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