Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
53a0cc7f
Commit
53a0cc7f
authored
Mar 17, 2021
by
Rucha Deshpande
Browse files
Add gitlab ci changes
parent
0c267b3e
Pipeline
#32149
passed with stages
in 13 minutes and 46 seconds
Changes
4
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
53a0cc7f
...
...
@@ -5,8 +5,17 @@ variables:
PORT
:
80
REPLICA
:
1
UTEST_RUNTIME_IMAGE
:
seistore-svc-runtime
#aws variables
#azure variables
AWS_SERVICE
:
seismic-store
AWS_BUILD_SUBDIR
:
src/cloud/providers/aws/build-aws
AWS_TEST_SUBDIR
:
tests
AWS_ENVIRONMENT
:
dev
AWS_BUILDER_DOCKERFILE_PATH
:
src/cloud/providers/aws/build-aws/builder.Dockerfile
AWS_RUNTIME_DOCKERFILE_PATH
:
src/cloud/providers/aws/build-aws/runtime.Dockerfile
# skipping tests here. Using a local file to run tests
AWS_SKIP_TESTS
:
"
true"
#azure variables
AZURE_SERVICE
:
seismic-store-service
#gcp variables
GCP_APPLICATION_NAME
:
os-seismic-store-service
...
...
@@ -30,7 +39,13 @@ include:
# containerize
-
project
:
"
osdu/platform/ci-cd-pipelines"
file
:
"
containerize/seismic-store-service.yml"
# aws
-
project
:
"
osdu/platform/ci-cd-pipelines"
file
:
"
cloud-providers/aws.yml"
-
local
:
"
/devops/aws/awstest.yml"
# deploy
#azure
-
project
:
"
osdu/platform/ci-cd-pipelines"
...
...
@@ -39,7 +54,8 @@ include:
#ibm
-
project
:
"
osdu/platform/ci-cd-pipelines"
file
:
"
cloud-providers/ibm-seismic-store-service.yml"
#gcp
-
project
:
"
osdu/platform/ci-cd-pipelines"
file
:
"
cloud-providers/gcp-seismic-store-service.yml"
devops/aws/awstest.yml
0 → 100644
View file @
53a0cc7f
aws-test-newman
:
extends
:
-
.aws
-
.aws_base_variables
-
.aws_variables
stage
:
integration
image
:
node
needs
:
[
'
aws-update-ecs'
]
script
:
-
apt-get update
-
apt-get install -y python
-
apt-get install -y python-pip
-
pip install -r devops/aws/requirements.txt
-
svctoken=$(python devops/scripts/aws_jwt_client.py)
-
echo $svctoken
-
npm install -g newman
-
chmod +x ./tests/e2e/run_e2e_tests.sh
-
./tests/e2e/run_e2e_tests.sh --seistore-svc-url=${SEISMICSTORE_SVC_URL} --seistore-svc-api-key="NA" --user-idtoken="$svctoken" --user-idtoken="$svctoken" --tenant=opendes --subproject=awsdemosubproject --admin-email="${AWS_COGNITO_AUTH_PARAMS_USER}" --datapartition=opendes --legaltag01=opendes-sdmstestlegaltag --legaltag02=opendes-sdmstestlegaltag --subproject-long-name=subprojectlonggggggggggggggggggggggname --VCS-Provider="${ISGITLAB}"
only
:
variables
:
-
$AWS == 'true'
artifacts
:
when
:
always
paths
:
-
$INTEGRATION_TEST_DIR
expire_in
:
14 days
devops/aws/requirements.txt
0 → 100644
View file @
53a0cc7f
adal==1.2.2
boto3==1.14.40
botocore==1.17.54
certifi==2019.11.28
cffi==1.14.0
chardet==3.0.4
cryptography==2.8
docutils==0.15.2
idna==2.9
jmespath==0.10.0
pycparser==2.20
PyJWT==1.7.1
python-dateutil==2.8.1
requests==2.23.0
s3transfer==0.3.3
six==1.14.0
urllib3==1.25.8
xmlrunner==1.7.7
\ No newline at end of file
devops/scripts/aws_jwt_client.py
0 → 100644
View file @
53a0cc7f
import
os
;
import
boto3
;
import
jwt
;
def
get_id_token
():
client
=
boto3
.
client
(
'cognito-idp'
,
region_name
=
os
.
environ
[
"AWS_REGION"
])
userAuth
=
client
.
initiate_auth
(
ClientId
=
os
.
environ
[
'AWS_COGNITO_CLIENT_ID'
],
AuthFlow
=
os
.
environ
[
'AWS_COGNITO_AUTH_FLOW'
],
AuthParameters
=
{
"USERNAME"
:
os
.
environ
[
'AWS_COGNITO_AUTH_PARAMS_USER'
],
"PASSWORD"
:
os
.
environ
[
'AWS_COGNITO_AUTH_PARAMS_PASSWORD'
]
})
print
(
userAuth
[
'AuthenticationResult'
][
'AccessToken'
])
def
get_invalid_token
():
#generate a dummy jwt
return
jwt
.
encode
({
'some'
:
'payload'
},
'secret'
,
algorithm
=
'HS256'
).
decode
(
"utf-8"
)
if
__name__
==
'__main__'
:
get_id_token
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment