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: ...@@ -63,30 +63,27 @@ 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'
# Output the pages job if (onDefaultBranch or publishResults):
pipelineConfig.write('\n'.join([ # Output the pages job
'pages:', pipelineConfig.write('\n'.join([
' image: alpine', '',
' stage: publish', 'pages:',
' artifacts:', ' image: alpine',
' paths:', ' stage: publish',
' - public', ' artifacts:',
' script:', ' paths:',
' - mkdir -p public', ' - public',
' - echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html', ' script:',
' - echo "<h1>Output of latest newman runs:</h1><ul>" >> public/index.html', ' - mkdir -p public',
' - find public -type f -not -name index.html | sort | sed \'s|public/\(.*\)|<li><a href="\\1">\\1</a>|\' >> public/index.html', ' - echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html',
' - echo "</ul></body></html>" >> public/index.html', ' - echo "<h1>Output of latest newman runs:</h1><ul>" >> public/index.html',
' rules:', ' - find public -type f -not -name index.html | sort | sed \'s|public/\(.*\)|<li><a href="\\1">\\1</a>|\' >> public/index.html',
' - if: \'$CI_COMMIT_BRANCH == "master"\'', ' - echo "</ul></body></html>" >> public/index.html',
' when: always', ' when: always',
' - if: \'$PUBLISH_RESULTS == "true"\'', ''
' when: always', ]))
' - when: never'
''
]))
# Output the configured jobs # Output the configured jobs
for environ in environments: 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