Commit 1afa912a authored by David Diederich's avatar David Diederich
Browse files

Adding protection against printing TEST_COLLECTION_CONFIG if it doesn't appear...

Adding protection against printing TEST_COLLECTION_CONFIG if it doesn't appear to be a file, as it should be
parent 8dbccdf7
Pipeline #3876 failed with stages
in 9 seconds
......@@ -45,11 +45,19 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
' name: postman/newman_alpine33',
' entrypoint: [""]',
' script:',
' - |',
' 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 "$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',
#' - 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',
''
]))
......
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