Skip to content

Commit 8469332

Browse files
authored
Merge pull request #8 from samchesney/develop
Add upstream Jenkins triggers
2 parents 72ffd49 + acf184b commit 8469332

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Jenkinsfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ pipeline {
1010
REPO = 'lib_xassert'
1111
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
1212
}
13+
triggers {
14+
/* Trigger this Pipeline on changes to the repos dependencies
15+
*
16+
* If this Pipeline is running in a pull request, the triggers are set
17+
* on the base branch the PR is set to merge in to.
18+
*
19+
* Otherwise the triggers are set on the branch of a matching name to the
20+
* one this Pipeline is on.
21+
*/
22+
upstream(
23+
upstreamProjects:
24+
(env.JOB_NAME.contains('PR-') ?
25+
"../tools_released/${env.CHANGE_TARGET}," +
26+
"../tools_xmostest/${env.CHANGE_TARGET}," +
27+
"../xdoc_released/${env.CHANGE_TARGET}"
28+
:
29+
"../tools_released/${env.BRANCH_NAME}," +
30+
"../tools_xmostest/${env.BRANCH_NAME}," +
31+
"../xdoc_released/${env.BRANCH_NAME}"),
32+
threshold: hudson.model.Result.SUCCESS
33+
)
34+
}
1335
options {
1436
skipDefaultCheckout()
1537
}

0 commit comments

Comments
 (0)