Commit a089c75a authored by David Diederich's avatar David Diederich
Browse files

Since the variables aren't passing to the child pipeline, we just use them...

Since the variables aren't passing to the child pipeline, we just use them here as part of the pipeline YAML generation
parent e43345fc
Pipeline #7035 failed with stages
in 8 seconds
......@@ -63,10 +63,12 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
''
]))
pipelineConfig.write('\n');
onDefaultBranch = os.getenv('CI_COMMIT_BRANCH') == os.getenv('CI_DEFAULT_BRANCH')
publishResults = os.getenv('PUBLISH_RESULTS') == 'true'
if (onDefaultBranch or publishResults):
# Output the pages job
pipelineConfig.write('\n'.join([
'',
'pages:',
' image: alpine',
' stage: publish',
......@@ -79,12 +81,7 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
' - echo "<h1>Output of latest newman runs:</h1><ul>" >> public/index.html',
' - find public -type f -not -name index.html | sort | sed \'s|public/\(.*\)|<li><a href="\\1">\\1</a>|\' >> public/index.html',
' - echo "</ul></body></html>" >> public/index.html',
' rules:',
' - if: \'$CI_COMMIT_BRANCH == "master"\'',
' when: always',
' - if: \'$PUBLISH_RESULTS == "true"\'',
' when: always',
' - when: never'
''
]))
......
Markdown is supported
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