-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
46 lines (40 loc) · 1.81 KB
/
Copy pathJenkinsfile
File metadata and controls
46 lines (40 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* Loads vivarium_build_utils as a Jenkins shared library and calls monorepo()
to auto-provision a Multibranch Pipeline for each libs/ package.
Two shared libraries must be configured in Jenkins (Manage Jenkins > Configure System
> Global Pipeline Libraries):
- "get_vbu_version" pointing at vivarium_build_utils/bootstrap/ on branch "main"
- "vivarium_build_utils" pointing at vivarium_build_utils/ (branch resolved at runtime)
Adding a new package under libs/ is picked up automatically on the next run.
*/
// Load the full vivarium_build_utils library at the expected version
// Note that vivarium-suite is not a python package and so we do not attempt to
// determine a non-main specific version of vivarium_build_utils.
library("vivarium_build_utils@main")
pipeline {
agent any
options {
timestamps()
}
stages {
stage('Multi-Multibranch Pipeline') {
// Only provision Jenkins items from main builds.
when {
branch 'main'
}
steps {
script {
def jenkinsfiles = findFiles(glob: 'libs/*/Jenkinsfile').collect { it.path }
// 'Public' targets the Jenkins folder where public monorepo jobs are provisioned.
// githubCredentialsId is the GitHub App credential for the ihmeuw org on
// simsci's Jenkins; vbu intentionally requires it here so the org-specific
// value lives next to the org context rather than being baked into vbu.
monorepo(
jenkinsfiles: jenkinsfiles,
folderPrefix: 'Public',
githubCredentialsId: 'fad62062-b1f4-447b-997f-005d6b1ea41e',
)
}
}
}
}
}