Skip to content

Commit 93a1aaa

Browse files
authored
branch name in conda env in jenkinsfile (#244)
* branch name in conda env in jenkinsfile * Update Jenkinsfile * Update Jenkinsfile
1 parent 1f2e469 commit 93a1aaa

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Jenkinsfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,22 @@ def githubUsernameToSlackName(github_author) {
1111
}
1212

1313
pipeline_name="vivarium"
14-
conda_env_name="${pipeline_name}-${BUILD_NUMBER}"
14+
conda_env_name="${pipeline_name}-${BRANCH_NAME}-${BUILD_NUMBER}"
1515
conda_env_path="/tmp/${conda_env_name}"
1616
// defaults for conda and pip are a local directory /svc-simsci for improved speed.
1717
// In the past, we used /ihme/code/* on the NFS (which is slower)
1818
shared_path="/svc-simsci"
19-
19+
// comma separated string list of branches to run periodic builds on
20+
scheduled_branches = "main"
21+
CRON_SETTINGS = scheduled_branches.split(',').collect{it.trim()}.contains(BRANCH_NAME) ? 'H H(20-23) * * *' : ''
2022

2123
pipeline {
22-
// This agent runs as svc-simsci on node simsci-slurm-sbuild-p01.
24+
// This agent runs as svc-simsci on node simsci-ci-coordinator-01.
2325
// It has access to standard IHME filesystems and singularity
24-
agent { label "svc-simsci" }
26+
agent { label "coordinator" }
27+
triggers {
28+
cron(CRON_SETTINGS)
29+
}
2530

2631
options {
2732
// Keep 100 old builds.
@@ -75,7 +80,8 @@ pipeline {
7580
// customWorkspace setting must be ran within a node
7681
agent {
7782
node {
78-
label "svc-simsci"
83+
// Run child tasks on simsci-jenkinsagent-ci-p01.
84+
label "matrix-tasks"
7985
}
8086
}
8187
axes {
@@ -254,4 +260,4 @@ pipeline {
254260
} // Python matrix bracket
255261
} // Python matrix stage bracket
256262
} // stages bracket
257-
}
263+
}

0 commit comments

Comments
 (0)