Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
seismic-dms-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Domain Data Management Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
df921b36
Commit
df921b36
authored
4 years ago
by
Anuj Gupta
Browse files
Options
Downloads
Patches
Plain Diff
Ibm impl ci cd
parent
f6a6e37e
No related branches found
No related tags found
1 merge request
!14
Ibm impl ci cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
devops/scripts/ibm_jwt_client.py
+22
-0
22 additions, 0 deletions
devops/scripts/ibm_jwt_client.py
with
23 additions
and
0 deletions
.gitlab-ci.yml
+
1
−
0
View file @
df921b36
...
...
@@ -15,6 +15,7 @@ variables:
GCP_SERVICE
:
seismic-store-service
GCP_VENDOR
:
gcp
#ibm variables
IBM
:
'
true'
IBM_OPENSHIFT_PROJECT
:
og-cicd
IBM_VENDOR
:
ibm
...
...
This diff is collapsed.
Click to expand it.
devops/scripts/ibm_jwt_client.py
0 → 100644
+
22
−
0
View file @
df921b36
import
os
import
requests
import
json
url
=
os
.
getenv
(
'
KEYCLOAK_URL
'
)
client_id
=
os
.
getenv
(
'
KEYCLOAK_CLIENT_ID
'
)
client_secret
=
os
.
getenv
(
'
KEYCLOAK_CLIENT_SECRET
'
)
user
=
os
.
getenv
(
'
AUTH_USER_ACCESS
'
)
password
=
os
.
getenv
(
'
AUTH_USER_ACCESS_PASSWORD
'
)
payload
=
"
grant_type=password&client_id=
"
+
client_id
+
"
&client_secret=
"
+
client_secret
+
"
&username=
"
+
user
+
"
&password=
"
+
password
+
"
&scope=openid
"
headers
=
{
'
Content-Type
'
:
"
application/x-www-form-urlencoded
"
}
full_url
=
"
https://
"
+
url
+
"
/auth/realms/OSDU/protocol/openid-connect/token
"
response
=
requests
.
request
(
"
POST
"
,
full_url
,
data
=
payload
,
headers
=
headers
)
print
(
response
.
text
)
result
=
response
.
json
()
token
=
result
[
'
access_token
'
]
print
(
token
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment