Commit 13115650 authored by Aayushi Arora's avatar Aayushi Arora
Browse files

Merge remote-tracking branch 'origin/master' into spring-security-fix

parents 3a448b59 8bef7dec
Pipeline #115666 failed with stages
in 66 minutes and 16 seconds
......@@ -8,16 +8,22 @@ cleanup() {
trap cleanup EXIT
if [[ -z "${NAMESPACE}" ]]; then
NAMESPACE="osdu-azure"
NAMESPACE="osdu"
fi
export AZURE_SCHEMA_URL="http://schema.${NAMESPACE}.svc.cluster.local/api/schema-service/v1/schemas/system/"
if [[ -z "${AZURE_DNS_NAME}" ]]; then
AZURE_DNS_NAME="osdu-glab.msft-osdu-test.org"
fi
export AZURE_SCHEMA_URL="https://${AZURE_DNS_NAME}/api/schema-service/v1/schemas/system"
currentStatus="success"
currentMessage="All schemas uploaded successfully"
BEARER_TOKEN=`python $AZURE_DEPLOYMENTS_SUBDIR/Token.py`
export BEARER_TOKEN=$BEARER_TOKEN
python $AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $AZURE_SCHEMA_URL
if [ $ret -ne 0 ]; then
ret=$?
echo "Return value is $ret"
if [[ $ret -ne 0 ]]; then
currentStatus="failure"
currentMessage="Schema loading failed. Please check error logs for more details."
fi
......
......@@ -23,7 +23,6 @@ source ./validate-env.sh "SCHEMA_URL"
source ./validate-env.sh "ENTITLEMENTS_HOST"
bootstrap_schema_gettoken_onprem() {
echo "Waiting for a sidecar container is provisioned"
ID_TOKEN="$(curl --location --request POST "${OPENID_PROVIDER_URL}/protocol/openid-connect/token" \
--header "Content-Type: application/x-www-form-urlencoded" \
......@@ -35,21 +34,21 @@ bootstrap_schema_gettoken_onprem() {
}
bootstrap_schema_gettoken_gcp() {
echo "Waiting for a sidecar container is provisioned"
BEARER_TOKEN=$(gcloud auth print-identity-token --audiences="${AUDIENCES}")
export BEARER_TOKEN
echo "Clean-up for Datastore schemas"
python3 ./scripts/GcpDatastoreCleanUp.py
# FIXME CleanUP script needed only for TF installation
# echo "Clean-up for Datastore schemas"
# python3 ./scripts/GcpDatastoreCleanUp.py
# FIXME find a better solution about datastore cleaning completion
sleep 5
# sleep 5
}
bootstrap_schema_prechek_env() {
status_code=$(curl --retry 1 --location -globoff --request POST \
"${ENTITLEMENTS_HOST}/api/entitlements/v2/tenant-provisioning" \
status_code=$(curl --retry 1 --location -globoff --request GET \
"${ENTITLEMENTS_HOST}/api/entitlements/v2/groups" \
--write-out "%{http_code}" --silent --output "/dev/null"\
--header 'Content-Type: application/json' \
--header "data-partition-id: ${DATA_PARTITION}" \
......@@ -59,7 +58,7 @@ bootstrap_schema_prechek_env() {
then
echo "$status_code: Entitlements provisioning completed successfully!"
else
echo "$status_code: Entitlements provisioning failed!"
echo "$status_code: Entitlements provisioning is in progress or failed!"
exit 1
fi
}
......
......@@ -21,8 +21,6 @@ variables:
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapServiceAccountName=datafier-workload-identity-gke
$OSDU_GCP_HELM_TIMEOUT
# FIXME add value below for DEV2 pipeline
# OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS_DEV2: >
osdu-gcp-containerize-bootstrap-gitlab:
variables:
......@@ -46,22 +44,12 @@ osdu-gcp-deploy-deployment:
- echo $STATUS
- if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
# REFACTOR to common pipeline for DEV2
# osdu-gcp-dev2-deploy-deployment:
# variables:
# OSDU_GCP_BOOTSTRAP_NAMESPACE: config
# OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: workload-gke-bootstrap-sa
# needs:
# - osdu-gcp-containerize-gitlab
# - osdu-gcp-deploy-configmap
# - osdu-gcp-containerize-bootstrap-schema
# after_script:
# - echo ----- Verify Bootstrap -----
# - kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
# - POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}')
# - STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
# - echo $STATUS
# - if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
osdu-gcp-dev2-deploy-deployment:
needs:
- osdu-gcp-containerize-gitlab
- osdu-gcp-dev2-deploy-configmap
- osdu-gcp-containerize-bootstrap-gitlab
osdu-gcp-anthos-deploy-deployment:
needs:
......
......@@ -10,7 +10,7 @@
<artifactId>schema-test-core</artifactId>
<properties>
<os-core-lib-ibm.version>0.7.0</os-core-lib-ibm.version>
<os-core-lib-ibm.version>0.15.0-rc3</os-core-lib-ibm.version>
<os-core-lib-azure.version>0.6.1</os-core-lib-azure.version>
<os-core-lib-aws.version>0.13.0</os-core-lib-aws.version>
<maven.compiler.target>1.8</maven.compiler.target>
......
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