Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch name in conda env in jenkinsfile #244

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ def githubUsernameToSlackName(github_author) {
}

pipeline_name="vivarium"
conda_env_name="${pipeline_name}-${BUILD_NUMBER}"
conda_env_name="${pipeline_name}-${BRANCH_NAME}-${BUILD_NUMBER}"
conda_env_path="/tmp/${conda_env_name}"
// defaults for conda and pip are a local directory /svc-simsci for improved speed.
// In the past, we used /ihme/code/* on the NFS (which is slower)
shared_path="/svc-simsci"

// comma separated string list of branches to run periodic builds on
scheduled_branches = "main"
CRON_SETTINGS = scheduled_branches.split(',').collect{it.trim()}.contains(BRANCH_NAME) ? 'H H(20-23) * * *' : ''

pipeline {
// This agent runs as svc-simsci on node simsci-slurm-sbuild-p01.
// This agent runs as svc-simsci on node simsci-ci-coordinator-01.
// It has access to standard IHME filesystems and singularity
agent { label "svc-simsci" }
agent { label "coordinator" }
triggers {
cron(CRON_SETTINGS)
}

options {
// Keep 100 old builds.
Expand Down Expand Up @@ -75,7 +80,8 @@ pipeline {
// customWorkspace setting must be ran within a node
agent {
node {
label "svc-simsci"
// Run child tasks on simsci-jenkinsagent-ci-p01.
label "matrix-tasks"
}
}
axes {
Expand Down Expand Up @@ -254,4 +260,4 @@ pipeline {
} // Python matrix bracket
} // Python matrix stage bracket
} // stages bracket
}
}
Loading