Commit 64a439b8 authored by Shrikant Garg's avatar Shrikant Garg
Browse files

updated

parent f0ef0a6c
Pipeline #44058 passed with stages
in 69 minutes and 6 seconds
......@@ -6,13 +6,13 @@ import os;
class IBMToken(object):
def get_ibm_id_token(self):
url = os.getenv('KEYCLAOCK_URL')
clientId = os.getenv('CLIENT_ID')
clientSecret = os.getenv('CLIENT_SECRET')
grantType = os.getenv('GRANT_TYPE')
userName = os.getenv('USERNAME')
password = os.getenv('PASSWORD')
scope = os.getenv('SCOPE')
url = 'https://keycloak-tls-keycloak.osdu-qa-a1c3eaf78a86806e299f5f3f207556f0-0000.us-south.containers.appdomain.cloud/auth/realms/OSDU/protocol/openid-connect/token'
clientId = os.getenv('IBM_KEYCLOAK_CLIENT_ID')
clientSecret = os.getenv('IBM_KEYCLOAK_CLIENT_SECRET')
grantType = 'password'
userName = os.getenv('IBM_AUTH_USER_ACCESS')
password = os.getenv('IBM_AUTH_USER_ACCESS_PASSWORD')
scope = 'openid'
if url is None:
......@@ -47,7 +47,8 @@ class IBMToken(object):
result = response.json()
token = 'Bearer ' + result['access_token']
return token
print(token)
except Exception as e:
print(e)
......
export IBM_SCHEMA_URL=https://$IBM_DNS_NAME/api/schema-service/v1/schema
BEARER_TOKEN=`python $IBM_DEPLOYMENTS_SUBDIR/Token.py`
export IBM_SCHEMA_URL=https://schema-og-cicd.osdu-qa-a1c3eaf78a86806e299f5f3f207556f0-0000.us-south.containers.appdomain.cloud/api/schema-service/v1
BEARER_TOKEN=`python3 Token.py`
export BEARER_TOKEN=$BEARER_TOKEN
python $IBM_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $IBM_SCHEMA_URL
echo $BEARER_TOKEN
python3 ../DeploySharedSchemas.py -u $IBM_SCHEMA_URL
Markdown is supported
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