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
Platform Validation
Commits
96550a76
Commit
96550a76
authored
Jul 21, 2020
by
Kamlesh Todai
Browse files
Merge branch 'fix-test-collection-config' into 'master'
Fix test collection config See merge request
!57
parents
2d50cc08
946bb5bc
Pipeline
#3894
failed with stages
in 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
generate-pipeline.py
View file @
96550a76
...
...
@@ -45,11 +45,20 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
' name: postman/newman_alpine33'
,
' entrypoint: [""]'
,
' script:'
,
' - TEST_COLLECTION_CONFIG=$(eval echo \$$TEST_COLLECTION_CONFIG_VARNAME)'
,
' - |'
,
' test -f "$TEST_COLLECTION_CONFIG" || (('
,
' echo TEST_COLLECTION_CONFIG does not appear to be a file.'
,
' echo This probably means that you are running on a non-protected branch and did not'
,
' echo provide the deployment secrets manually. Or it could be a misconfigured variable.'
,
' echo'
,
' echo Warning: I am intentionally not printing the value of the variable in case it is the secret content itself.'
,
' ) && false)'
,
' - 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'
,
#
'
- npm install -g newman-reporter-html',
#
'
- npm install -g newman-reporter-htmlextra',
#
'
- newman run "$COLLECTION_JSON" -e "$ENVIRONMENT" -d "$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 "$TEST_COLLECTION_CONFIG" --reporters cli'
,
''
]))
...
...
@@ -76,6 +85,7 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
' needs: []'
,
' variables:'
,
' ENVIRONMENT: "'
+
environ
[
'path'
]
+
'"'
,
' TEST_COLLECTION_CONFIG_VARNAME: '
+
platform
.
upper
()
+
'_TEST_COLLECTION_CONFIG'
,
' COLLECTION_JSON: "'
+
collect
[
'path'
]
+
'"'
,
' HTML_REPORT_NAME: "'
+
htmlReportName
+
'"'
,
' JUNIT_REPORT_NAME: "'
+
junitReportName
+
'"'
...
...
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