-
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
[JENKINS-40906] Resolve an SCM from an SCMSource and a list of candidate target branch names
Link | New: This issue relates to JENKINS-32018 [ JENKINS-32018 ] |
Description |
Original:
Use-case: The [Apache Maven Jenkinsfile|https://github.com/apache/maven/blob/e51fc87277bb988aed7641d02fd888c77d0a1206/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 {code} 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 ... } } ... {code} 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 |
New:
Use-case: The [Apache Maven Jenkinsfile|https://github.com/apache/maven/blob/e51fc87277bb988aed7641d02fd888c77d0a1206/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 {code} 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 ... } } ... {code} 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 |
Remote Link | New: This issue links to "PR#46 (Web Link)" [ 15223 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Some similarities and partial overlap in use-cases