Closed keithm-xmos closed 1 year ago
Another idea is to call https://github.com/xmos/xmos_jenkins_shared_library/blob/develop/vars/extractFromScm.txt and check the event. Only poll for artifacts if the event==pull_request. This will cause all checks for artifacts later in the pipeline to be SKIPPED.
Tried the following without any luck:
def (_, _, _, _, branch, _, _, event) = extractFromScm()
if (event=="pull_request" || branch=="main" || branch=="develop") {
// Wait here until specified artifacts appear
def artifactUrls = getGithubArtifactUrls([
"bare-metal_examples",
"freertos_core_examples",
"freertos_aiot_examples"
// "host_apps",
// "rtos_tests"
])
}
It appears extractFromScm
must be called inside a pipeline.
This may be because Jenkins expects a build on the "compare" branch of a PR. To test this theory, try changing the triggers in
ci.yml