Skip to content

Commit

Permalink
CI: only perform tox stage for systems that are available
Browse files Browse the repository at this point in the history
  • Loading branch information
henryborchers committed Oct 11, 2023
1 parent 93ab3f3 commit 9fb7834
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,23 +187,31 @@ pipeline {
''
)
def linuxJobs = [:]
if(nodesByLabel("linux && docker").size() > 0)){
linuxJobs = tox.getToxTestsParallel(
envNamePrefix: 'Tox Linux',
label: 'linux && docker',
dockerfile: 'ci/docker/linux/tox/Dockerfile',
dockerArgs: '--build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL',
dockerRunArgs: "-v pipcache_uiucprescon_build:/.cache/pip",
retry: 2
)
} else {
echo 'No nodes with the following labels: linux && docker labels'
}
def windowsJobs = [:]
linuxJobs = tox.getToxTestsParallel(
envNamePrefix: 'Tox Linux',
label: 'linux && docker',
dockerfile: 'ci/docker/linux/tox/Dockerfile',
dockerArgs: '--build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL',
dockerRunArgs: "-v pipcache_uiucprescon_build:/.cache/pip",
retry: 2
)
windowsJobs = tox.getToxTestsParallel(
envNamePrefix: 'Tox Windows',
label: 'windows && docker && x86',
dockerfile: 'ci/docker/windows/tox/Dockerfile',
dockerArgs: '--build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg CHOCOLATEY_SOURCE',
dockerRunArgs: "-v pipcache_uiucprescon_build:c:/users/containeradministrator/appdata/local/pip",
retry: 2
)
if(nodesByLabel("linux && docker").size() > 0)){
windowsJobs = tox.getToxTestsParallel(
envNamePrefix: 'Tox Windows',
label: 'windows && docker && x86',
dockerfile: 'ci/docker/windows/tox/Dockerfile',
dockerArgs: '--build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg CHOCOLATEY_SOURCE',
dockerRunArgs: "-v pipcache_uiucprescon_build:c:/users/containeradministrator/appdata/local/pip",
retry: 2
)
} else {
echo 'No nodes with the following labels: windows && docker && x86'
}
parallel(linuxJobs + windowsJobs)
}
}
Expand Down

0 comments on commit 9fb7834

Please sign in to comment.