Commit 325631c1 authored by Denis Karpenok (EPAM)'s avatar Denis Karpenok (EPAM)
Browse files

GCP environment

parent 673d1e46
......@@ -33,12 +33,12 @@ azure v2.4:
- artifact: azure.OSDU R3 PROD v2.4.gitlab-ci.yml
job: generate-pipeline
#gcp v2.4:
# trigger:
# strategy: depend
# include:
# - artifact: gcp.OSDU R3 PROD v2.4.gitlab-ci.yml
# job: generate-pipeline
gcp v2.4:
trigger:
strategy: depend
include:
- artifact: gcp.OSDU R3 PROD v2.4.gitlab-ci.yml
job: generate-pipeline
#ibm v2.4:
# trigger:
......
{
"id": "f68169a2-a5b5-4f7b-8e87-63dbec19e097",
"name": "gcp.OSDU R3 PROD v1.0",
"id": "a4518bdb-3397-4a12-98ed-aad4b76d9341",
"name": "OSDU R3 GCP PROD v2.4",
"values": [
{
"key": "TENANT_ID",
"value": "",
"enabled": true
},
{
"key": "access_token",
"value": "ya29.a0AfH6SMBa9lWNNbsWz1ptuf3MQyVKqFAD8sygYWzElyPft11unlWXjQmaC_q9uyVIaizfj9Mx2IHAsPYQR8ZijiwHT0efg9SVGtRJUmmziAQTeFaLDjtq6aAVvbTYrZ5mv6JIR6FI0qNYJM6EbELUp8OD4qWp8FpXVn7r",
"enabled": true
},
{
"key": "id_token",
"value": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjRlNGViZTQ4N2Q1Y2RmMmIwMjZhM2IyMjlkODZmMGQ0MjU4NDQ5ZmUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI2ODk3NjI4NDI5OTUtaWtkM3ZrMjRsanM4OTZna29lODZjc3B0cGZ2MWZnMDEuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI2ODk3NjI4NDI5OTUtaWtkM3ZrMjRsanM4OTZna29lODZjc3B0cGZ2MWZnMDEuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDc1MDY0MzY3MzcxMTI4NTU1ODciLCJoZCI6Im9zZHUtZ2NwLmdvMy1ucmcucHJvamVjdHMuZXBhbS5jb20iLCJlbWFpbCI6ImRydWRrb0Bvc2R1LWdjcC5nbzMtbnJnLnByb2plY3RzLmVwYW0uY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJILS1aZllzbHIwcjhSOWxYeVpTSmp3IiwiaWF0IjoxNTk0OTgzNTc3LCJleHAiOjE1OTQ5ODcxNzd9.U5waKpwF7aF3-gcZiwKBwM4NjlrGv2pxmvQTHQ8Gddj5JKxC1cwsuA07gFBBkcnUloR90jvJL-bjA6fyU1o2Md5hfdTcpiNuIYWygnos4bfRa0IoE_w0bOPdUAcOKK7R2FwnTCQOU8gfMXkW0f1xkNgWRddOoMumz7mUR2KiW2u4EMESHckGYQmkf20jgsTHlgnmqnF2kdJ3JUc226tv-QnGSSb1NSH1Z3T5KSRzfCx0lNHpHbvw8wpRZLk3Ipm9Hs9E3UUHErfBa34IGojIX8liuSwTnK7zGnTF9St24Q2RR8vWUXrcKSzk3WAvthqmsUw-2ZfrCn4CgfbOCIAvBQ",
"enabled": true
},
{
"key": "refresh_token",
"value": "1//04FQfE1paviA-CgYIARAAGAQSNwF-L9IrrcwmdAmB2Ai9y1ppcad4WL0aUMYGzNQHmUH2x12U8Ps4dZ0AJzIFS--9Zqqa-Ab2U2I",
"enabled": true
},
{
"key": "CLIENT_ID",
"value": "",
......@@ -19,22 +34,27 @@
},
{
"key": "LEGAL_HOST",
"value": "os-legal-dot-osdu-sample.appspot.com/api/legal/v1",
"value": "os-legal-dot-nice-etching-277309.uc.r.appspot.com/api/legal/v1",
"enabled": true
},
{
"key": "STORAGE_HOST",
"value": "os-storage-dot-osdu-sample.appspot.com/api/storage/v2",
"value": "os-storage-dot-nice-etching-277309.uc.r.appspot.com/api/storage/v2",
"enabled": true
},
{
"key": "SEARCH_HOST",
"value": "os-search-dot-osdu-sample.appspot.com/api/search/v2",
"value": "os-search-dot-nice-etching-277309.uc.r.appspot.com/api/search/v2",
"enabled": true
},
{
"key": "DELIVERY_HOST",
"value": "os-delivery-attcrcktoa-uc.a.run.app/api/delivery/v2/GetFileSignedUrl",
"enabled": true
},
{
"key": "record_id",
"value": 999376336799,
"value": "999605662766",
"enabled": true
},
{
......@@ -49,12 +69,12 @@
},
{
"key": "SCHEMA_HOST",
"value": "d3v1dxbwtqwo1x.cloudfront.net",
"value": "os-storage-dot-nice-etching-277309.uc.r.appspot.com/api/storage/v2/schemas",
"enabled": true
},
{
"key": "schema_version",
"value": "0.2.5",
"value": "0.2.1",
"enabled": true
},
{
......@@ -64,111 +84,282 @@
},
{
"key": "ENTITLEMENTS_HOST",
"value": "entitlements-dot-osdu-sample.appspot.com/entitlements/v1",
"value": "entitlements-dot-nice-etching-277309.uc.r.appspot.com/entitlements/v1",
"enabled": true
},
{
"key": "domain",
"value": ".osdu.joonix.net",
"value": ".osdu-gcp.go3-nrg.projects.epam.com",
"enabled": true
},
{
"key": "NewWellUWI",
"value": "999863066029",
"value": "999505209565",
"enabled": true
},
{
"key": "tagName",
"value": "common-Test-Legal-Tag-3356953",
"value": "osdu-Well-Legal-Tag-Test1523102",
"enabled": true
},
{
"key": "New_ViewerDataGroup",
"value": "data.default.viewer",
"value": "data.wellboreMarkerdb47059.viewers",
"enabled": true
},
{
"key": "NewWellName",
"value": "CertificationWell999863066029",
"value": "CertificationWell999505209565",
"enabled": true
},
{
"key": "recordID",
"value": "common:osdu:999863066029",
"value": "osdu:osdu:999567457377",
"enabled": true
},
{
"key": "access_token",
"value": "ya29.a0AfH6SMBgj-WgrM1yEs6-xCsvmO1YLDGEi4OYC7lengyFyFLjfILVhfz6x-oDmpPPoRddQHPj8HflRqreCB4cXmiK_IIjtjRsUNILdGOWCF8Ct_DoHYdmfOl79YscqxzinDa7Aokk2Is47hzwiTWL2MveWUyd8vbh-uU",
"key": "Token_Fetch_URL",
"value": "https://oauth2.googleapis.com/token",
"enabled": true
},
{
"key": "id_token",
"value": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjY1YjNmZWFhZDlkYjBmMzhiMWI0YWI5NDU1M2ZmMTdkZTRkZDRkNDkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI3NTMyNTkxNjkzMDgtc3IyYWhybmppNWRvbDFvbTBiZTcyN2FxZzRmODltbm0uYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI3NTMyNTkxNjkzMDgtc3IyYWhybmppNWRvbDFvbTBiZTcyN2FxZzRmODltbm0uYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTYzNDk3NDczMTYyMjE3MDk4ODUiLCJhdF9oYXNoIjoiLWJCSHFVY1l2dXdJMFJJSEwtX3pLUSIsImlhdCI6MTU5NDcxMzIxNSwiZXhwIjoxNTk0NzE2ODE1fQ.kc5HwybLWmm4jE4_2o-AfcGLlPuxKxlHWsbO_Q4UHd8zQiXbizJaykReFWxtbuDgP9zpuSAHBrpwm0q0z7sj8IyAE7mqgGoMsHH0s7JK4jNcUM5pRA9qklmgJqtClqaJ6e4Fxnob6GxRiW9SgHG2zUHVcZiIrRUs9S2D81JFk3o4PVFav6hgUI319NXJbBOmmUw-_jys_yBiJbkRxn0jOFGigByUdTFrXcz6msueJVMNXTr8mmtBsn5v7jh5wrY3NeLUT7pQb-a2alMtSqo1LCcUCbOvR68y4XjollOJFOqpLa4Ri9Zt7ChrYDESRoQn1dXOMhesjIXFMO1juinmTQ",
"key": "LegalTagNameExists",
"value": "osdu-Wellbore-Legal-Tag-Test5184340",
"enabled": true
},
{
"key": "refresh_token",
"value": "ya29.a0AfH6SMA1TA_6Rh4-ad4ye08oB_6DSDnNv7xGg_Oal8SDrALqkHyEFXj1v_s91ayaohSBvkDQBaj08CjrPBOgH773Cook_Nu9UVg66_mb82Zkh6E4MZwS-2wBJF1f1Oxvki6rZKWlfAjSVnJp3WIzgw9dh22AqWWm3LFL9vHF",
"key": "LegalTagNameNotExists",
"value": "Test-Legal",
"enabled": true
},
{
"key": "Token_Fetch_URL",
"value": "https://oauth2.googleapis.com/token",
"key": "wellbore_record_id",
"value": "osdu:osdu:99953558065501",
"enabled": true
},
{
"key": "LegalTagNameExists",
"value": "common-Test-Legal-Tag-3356953",
"key": "NewUserName",
"value": "user5952279@osdu.osdu-gcp.go3-nrg.projects.epam.com",
"enabled": true
},
{
"key": "LegalTagNameNotExists",
"value": "Test-Legal",
"key": "WellboreMarkerFileSRN",
"value": "srn:file/csv:65974824044849690000:",
"enabled": true
},
{
"key": "wellbore_record_id",
"value": "opendes:osdu:99941746816201",
"key": "WellboreMarkerWPCSRN",
"value": "srn:work-product-component/Wellboremarker:99841812308142210000:",
"enabled": true
},
{
"key": "NewUserName",
"value": "user3528933@opendes.contoso.com",
"key": "WellboreMarkerWPSRN",
"value": "srn:work-product/WellboreMarker:43771903146212440000:",
"enabled": true
},
{
"key": "username",
"value": "",
"key": "WellboreMarkerFileRecordID",
"value": "osdu:doc:f5dc95bd9a5c43c1861e8a71ad0295de",
"enabled": true
},
{
"key": "password",
"value": "",
"key": "WellboreMarkerWPCRecordID",
"value": "osdu:doc:548232f241ff4a6ab3bc7e92643abe22",
"enabled": true
},
{
"key": "WellboreMarkerWPRecordID",
"value": "osdu:doc:925415fd21da4139b3e007eb18c90d7d",
"enabled": true
},
{
"key": "WellboreTrajectoryFileSRN",
"value": "srn:file/csv:35572727911163560000:",
"enabled": true
},
{
"key": "WellboreTrajectoryWPCSRN",
"value": "srn:work-product-component/WellboreTrajectory:93799658727482100000:",
"enabled": true
},
{
"key": "WellboreTrajectoryWPSRN",
"value": "srn:work-product/WellboreTrajectory:41129254451252350000:",
"enabled": true
},
{
"key": "WellboreTrajectoryFileRecordID",
"value": "osdu:doc:c82942970007435e869d5ec07d0c4dfe",
"enabled": true
},
{
"key": "WellboreTrajectoryWPCRecordID",
"value": "osdu:doc:e41a5d3a20e14e73a4094ee71f8741ec",
"enabled": true
},
{
"key": "WellboreTrajectoryWPRecordID",
"value": "osdu:doc:0510b71079934d0e87b843f1c6c4107f",
"enabled": true
},
{
"key": "WellLogFileSRN",
"value": "srn:file/las2:70868852174423330000:",
"enabled": true
},
{
"key": "WellLogWPCSRN",
"value": "srn:work-product-component/WellLog:92254945880643570000:",
"enabled": true
},
{
"key": "WellLogWPSRN",
"value": "srn:work-product/WellLog:94799240276515050000:",
"enabled": true
},
{
"key": "WellLogFileRecordID",
"value": "osdu:doc:23fc3a2757bd412f8400d96e4df15ca5",
"enabled": true
},
{
"key": "WellLogWPCRecordID",
"value": "osdu:doc:ab398f32a16544be8d7e923cfd8971bb",
"enabled": true
},
{
"key": "WellLogWPRecordID",
"value": "osdu:doc:ee6979ba71f44fc3b6fd25888dc62093",
"enabled": true
},
{
"key": "NewSeismicHorizonName",
"value": "CertificationSeismicHorizon999375643682",
"enabled": true
},
{
"key": "NewSeismicHorizonUWI",
"value": "999375643682",
"enabled": true
},
{
"key": "SeismicTracenRecordID",
"value": "osdu:doc:6b3c6985ef4540ba9840f944c2f8d0ba",
"enabled": true
},
{
"key": "SeismicAcquisitionProjectRecordID",
"value": "osdu:doc:7935ff9b6cd9456da6704b56a6632858",
"enabled": true
},
{
"key": "SeismicInterpretationProjectRecordID",
"value": "osdu:doc:fa99eefc564e467293eba7573b803ae3",
"enabled": true
},
{
"key": "SeismicProcessingProjectRecordID",
"value": "osdu:doc:9e70dd1567514739a5da5b1564b87ca9",
"enabled": true
},
{
"key": "SeismicHorizonRecordID",
"value": "osdu:doc:e6c0cc8317db419c85797d57a69dcc16",
"enabled": true
},
{
"key": "NewSeismicTraceName",
"value": "CertificationSeismicHorizon999539276683",
"enabled": true
},
{
"key": "NewSeismicTraceUWI",
"value": "999539276683",
"enabled": true
},
{
"key": "NewSeismicAcquisitionProjectName",
"value": "CertificationSeismicHorizon999891201321",
"enabled": true
},
{
"key": "NewSeismicAcquisitionProjectUWI",
"value": "999891201321",
"enabled": true
},
{
"key": "NewSeismicInterpretationProjectName",
"value": "CertificationSeismicHorizon999430785939",
"enabled": true
},
{
"key": "NewSeismicInterpretationProjectUWI",
"value": "999430785939",
"enabled": true
},
{
"key": "NewSeismicProcessingProjectName",
"value": "CertificationSeismicHorizon999594440151",
"enabled": true
},
{
"key": "NewSeismicProcessingProjectUWI",
"value": "999594440151",
"enabled": true
},
{
"key": "WellRecordID",
"value": "osdu:osdu:999505209565",
"enabled": true
},
{
"key": "schemaName",
"value": "Test999250050140",
"enabled": true
},
{
"key": "auth_url",
"value": "accounts.google.com/o/oauth2/auth",
"enabled": true
},
{
"key": "callback_url",
"value": "https://developers.google.com/oauthplayground",
"enabled": true
},
{
"key": "data-partition-id",
"value": "common",
"value": "osdu",
"enabled": true
},
{
"key": "cp",
"key": "cloud_platform",
"value": "GCP",
"enabled": true
},
{
"key": "dataType",
"value": "Public Domain Data",
"key": "NewWellUWI1",
"value": "",
"enabled": true
},
{
"key": "DELIVERY_HOST",
"value": "os-delivery-b3m55ng4la-uc.a.run.app/api/delivery/v2",
"key": "WellRecordID1",
"value": "",
"enabled": true
},
{
"key": "schemaNameWell",
"value": "",
"enabled": true
},
{
"key": "schemaNameWellbore",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2020-07-16T00:04:15.381Z",
"_postman_exported_using": "Postman/7.27.1"
"_postman_exported_at": "2020-06-23T09:16:37.432Z",
"_postman_exported_using": "Postman/7.26.1"
}
......@@ -5,30 +5,30 @@ import os
environments = []
collections = []
i = 0;
i = 0
for root, dirnames, filenames in os.walk(os.environ['CI_PROJECT_DIR']):
if "Postman Collection" in root:
for f in filenames:
def addEntry(array):
array.append({
'nameParts': os.path.basename(f).split('.')[0:-2],
'path': os.path.join(root, f)
})
if f.endswith('.postman_environment.json'): addEntry(environments);
if f.endswith('.postman_collection.json'): addEntry(collections);
if "Postman Collection" in root:
for f in filenames:
def addEntry(array):
array.append({
'nameParts': os.path.basename(f).split('.')[0:-2],
'path': os.path.join(root, f)
})
if f.endswith('.postman_environment.json'): addEntry(environments);
if f.endswith('.postman_collection.json'): addEntry(collections);
for environ in environments:
platform = environ['nameParts'][0]
environName = '.'.join(environ['nameParts'])
platform = environ['nameParts'][0]
environName = '.'.join(environ['nameParts'])
with open(environName + '.gitlab-ci.yml', 'w') as pipelineConfig:
stageName = platform + ' Test'
with open(environName + '.gitlab-ci.yml', 'w') as pipelineConfig:
stageName = platform + ' Test'
pipelineConfig.write('\n'.join([
'stages:',
' - ' + stageName,
'',
'.newman:',
pipelineConfig.write('\n'.join([
'stages:',
' - ' + stageName,
'',
'.newman:',
' stage: ' + stageName,
' tags: ' + "[\"docker-runner\"]",
' image:',
......@@ -37,30 +37,29 @@ for environ in environments:
' variables:',
' ENVIRONMENT: ' + environ['path'],
' script:',
' - newman --version ',
'# - npm install -g newman-reporter-html',
'# - npm install -g newman-reporter-htmlextra',
' - newman --version ',
'# - npm install -g newman-reporter-html',
'# - npm install -g newman-reporter-htmlextra',
'# - newman run "$COLLECTION_JSON" -e "$ENVIRONMENT" -d "$' + platform.upper() + '_TEST_COLLECTION_CONFIG" --reporters cli,htmlextra,junit --reporter-htmlextra-export "$HTML_REPORT_NAME" --reporter-junit-export "$JUNIT_REPORT_NAME"',
' - newman run "$COLLECTION_JSON" -e "$ENVIRONMENT" -d "$' + platform.upper() + '_TEST_COLLECTION_CONFIG" --reporters cli',
'',
'# --------------------------------------------------------------------------------'
]) + '\n')
'',
'# --------------------------------------------------------------------------------'
]) + '\n')
for collect in collections:
collectionName = '.'.join(collect['nameParts'])
sep = '_';
collString = sep.join(collect['nameParts']);
platformString = platform + ".";
htmlReportName = platformString + collString + "_report_extra.html";
junitReportName = platformString + collString + "_report_junit.xml"
pipelineConfig.write('\n'.join([
'',
collectionName + ':',
' extends: .newman',
' variables:',
' COLLECTION_JSON: "' + collect['path'] + '"',
' HTML_REPORT_NAME: "' + htmlReportName + '"',
' JUNIT_REPORT_NAME: "' + junitReportName + '"'
]) + '\n')
for collect in collections:
collectionName = '.'.join(collect['nameParts'])
sep = '_';
collString = sep.join(collect['nameParts']);
platformString = platform + ".";
htmlReportName = platformString + collString + "_report_extra.html";
junitReportName = platformString + collString + "_report_junit.xml"
pipelineConfig.write('\n'.join([
'',
collectionName + ':',
' extends: .newman',
' variables:',
' COLLECTION_JSON: "' + collect['path'] + '"',
' HTML_REPORT_NAME: "' + htmlReportName + '"',
' JUNIT_REPORT_NAME: "' + junitReportName + '"'
]) + '\n')
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