I am setting up a pipeline job that checks out four GitHub repositories. If
changes are pushed to any of these repositories, I want the job to kick off.
How should I go about this?
Below is my pipeline script (names have been changed)
node() {
stage ('Checkout') {
parallel 'Checkout':{
dir('MyProduct') {
git url: '[email protected]:MyCompany/MyProduct.git'
}
dir('RelatedRepo1') {
git url: '[email protected]:MyCompany/RelatedRepo1.git'
}
dir('RelatedRepo2') {
git url: '[email protected]:MyCompany/RelatedRepo2.git'
}
dir('RelatedRepo3') {
git url: '[email protected]:MyCompany/RelatedRepo3.git'
}
}
}
stage ('Build') {
bat 'nuget restore "MyProduct/MyProduct all projects.sln"'
bat '"C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe"
"MyProduct\\MyProduct all projects.sln" /p:Configuration=Release'
}
stage ('Test') {
bat '"C:\\Program Files (x86)\\NUnit 2.6.4\\bin\\nunit-console-x86.exe"
"MyProduct\\UnitTestMyProduct\\bin\\Release\\UnitTestMyProduct.dll"'
step([$class: 'NUnitPublisher', testResultsPattern: 'TestResult.xml',
debug: false, keepJUnitReports: true, skipJUnitArchiver:false,
failIfNoResults: true])
}
stage ('Archive') {
archiveArtifacts 'MyProduct\\MyProduct\\bin\\Release\\*'
}
}
P.S. Any other tips for improvement are happily accepted.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/33002c26-385b-40e1-bee3-2cfd9551816d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.