-
New Feature
-
Resolution: Fixed
-
Minor
-
None
Use-case:
The Apache Maven Jenkinsfile wants to run integration tests when testing a build of Maven core.
As new features are added, there is often a need to add associated integration tests.
It would be great if the Jenkinsfile could easily determine if there is a matching branch in the maven-integration-testing repository and check that out... but if there is no matching branch then the master branch should be used instead.
Something like
def tests=resolveScm(source:git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git'), targets:[env.BRANCH_NAME,'master'])) node('ubuntu') { stage 'Checkout'{ ... checkout scm } ... } stage 'Integration Test' parallel linuxJava7:{ node('ubuntu') { checkout tests ... } },linuxJava8: { node('ubuntu') { checkout tests ... } },winJava7: { node('windows-2012') { checkout tests ... } },winJava8: { node('windows-2012') { checkout tests ... } } ...
There are a couple of important features:
- We want to use the SCMSource to create the SCM so that it has a pinned revision and the same version of the tests are used on each of the parallel integration test runs
- We want to allow a list of branches to be tried in preference order
- We want to avoid requiring conditional behaviour to use this feature in the pipeline so that it can also be used from pipeline-model-definition based pipelines
- relates to
-
JENKINS-32018 Multibranch workflow project tracking multiple repositories
- Open
- links to