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,30 +63,27 @@ with open('test-execution.gitlab-ci.yml', 'w') as pipelineConfig:
''
]))
pipelineConfig.write('\n');
# Output the pages job
pipelineConfig.write('\n'.join([
'pages:',
' image: alpine',
' stage: publish',
' artifacts:',
' paths:',
' - public',
' script:',
' - mkdir -p public',
' - echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html',
' - 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'
''
]))
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',
' artifacts:',
' paths:',
' - public',
' script:',
' - mkdir -p public',
' - echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html',
' - 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',
' when: always',
''
]))
# Output the configured jobs
for environ in environments:
......
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