Commit ce002e90 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'gcp-switch-policy-ent2' into 'master'

Update Policy service to work with ent2 [GONRG-2987]

See merge request !42
parents 5b5c14ac 6c4abb5c
Pipeline #58300 passed with stages
in 6 minutes
......@@ -9,10 +9,9 @@ variables:
AWS_TEST_SUBDIR: tests/aws
AWS_INT_TEST_TYPE: python
AZURE: 'true'
AZURE: "true"
AZURE_BUILD_SUBDIR: build/azure
AZURE_TEST_TYPE: 'python'
AZURE_TEST_TYPE: "python"
AZURE_SERVICE: policy
AZURE_DEPLOYMENTS_SUBDIR: deployment/scripts/azure
AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR: deployment/scripts
......@@ -21,15 +20,15 @@ variables:
DATA_PARTITION: opendes
AZURE_AD_APP_RESOURCE_ID: $AZURE_APP_ID
AZURE_TEST_SUBDIR: tests/azure
IBM_DEPLOYMENTS_SUBDIR: deployment/scripts/ibm
IBM_TEST_SUBDIR: tests/ibm
OSDU_GCP_POLICY_CLUSTER: asm-primary
OSDU_GCP_ZONE: us-central1-c
OSDU_GCP_DATA_PARTITION: osdu
OSDU_GCP_PROJECT: nice-etching-277309
include:
- project: "osdu/platform/ci-cd-pipelines"
file: "standard-setup.yml"
......@@ -37,11 +36,11 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
file: "build/python.yml"
- project: 'osdu/platform/ci-cd-pipelines'
file: 'cloud-providers/aws-global.yml'
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/aws-global.yml"
- project: 'osdu/platform/ci-cd-pipelines'
file: 'cloud-providers/azure.yml'
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/azure.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa-python.yml"
......@@ -51,7 +50,7 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/ibm-policy.yml"
- local: "/devops/azure/override-stages.yml"
- local: "/devops/aws/bootstrap.yaml"
......@@ -113,7 +112,7 @@ osdu-gcp-deploy:
script:
- gcloud auth activate-service-account --key-file $OSDU_GCP_DEPLOY_FILE
- gcloud config set project $OSDU_GCP_PROJECT
- gcloud container clusters get-credentials $OSDU_GCP_POLICY_CLUSTER --zone us-central1-c --project $OSDU_GCP_PROJECT
- gcloud container clusters get-credentials $OSDU_GCP_POLICY_CLUSTER --zone $OSDU_GCP_ZONE --project $OSDU_GCP_PROJECT
- curl https://get.helm.sh/helm-v3.5.2-linux-amd64.tar.gz -s -o helm.tgz; tar -zxf helm.tgz; mv linux-amd64/helm /usr/local/bin/
- cd deployment/helm3
- helm upgrade policy . --install --create-namespace --wait --set imageRegistry=$IMAGE_TAG -f values-osdu-gcp.yaml -n default
......
......@@ -3,9 +3,9 @@
# Declare variables to be passed into your templates.
data:
entitlements_base_url: "https://os-entitlements-gcp-attcrcktoa-uc.a.run.app"
legal_base_url: "https://os-legal-attcrcktoa-uc.a.run.app"
entitlements_base_path: "/entitlements/v1/groups"
entitlements_base_url: "http://entitlements"
legal_base_url: "http://legal"
entitlements_base_path: "/api/entitlements/v2/groups"
policy_namespace: default
imageRegistry: "community.opengroup.org:5555/osdu/platform/security-and-compliance/policy:latest"
......@@ -2,6 +2,8 @@ osdu-gcp-bootstrap:
stage: bootstrap
needs: ["osdu-gcp-deploy"]
image: gcr.io/google.com/cloudsdktool/cloud-sdk
variables:
GOOGLE_AUDIENCE: 689762842995-pv217jo3k8j803kk6gqf52qb5amos3a9.apps.googleusercontent.com
script:
- gcloud auth activate-service-account --key-file $OSDU_GCP_DEPLOY_FILE
- gcloud config set project $OSDU_GCP_PROJECT
......@@ -12,7 +14,7 @@ osdu-gcp-bootstrap:
- pip install -r requirements.txt
- gcloud auth activate-service-account --key-file OSDU_GCP_INTEGRATION_TESTER.json
- gcloud config set project $OSDU_GCP_PROJECT
- BEARER_TOKEN=`gcloud auth print-access-token`
- BEARER_TOKEN=`gcloud auth print-identity-token --audiences=$GOOGLE_AUDIENCE`
- export BEARER_TOKEN=$BEARER_TOKEN
- export DATA_PARTITION=$OSDU_GCP_DATA_PARTITION
- python3 deployment/scripts/BootstrapDefaultPolicies.py -u $GCP_POLICY_SERVICE_URL
......
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