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

Declare agents within a stage to release the agent when stage is over #904

Merged
merged 1 commit into from
Jan 31, 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
10 changes: 9 additions & 1 deletion tools/reproduce_comparison/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import groovy.json.JsonOutput

env.NODE_LABEL = 'dockerBuild&&linux&&x64'
pipeline {
agent { label NODE_LABEL }
agent none
parameters {
string(name: 'COMPARED_JOB_NUMBER', defaultValue: '', description: 'Compared nightly build job number')
string(name: 'COMPARED_JOB_NAME', defaultValue: '', description: 'Compared nightly build job name')
Expand All @@ -15,6 +15,10 @@ pipeline {

stages {
stage('Prepare') { //Copy artifacts, reset parameters,trigger build and copyArtifacts
agent { label NODE_LABEL }
options {
timeout(time: 2, unit: 'HOURS')
}
steps {
cleanWs()
checkout scm
Expand Down Expand Up @@ -107,6 +111,10 @@ pipeline {
}
stage('Compare') {
agent { label NODE_LABEL }
options {
// Timeout counter starts BEFORE agent is allocated
timeout(time: 30, unit: 'MINUTES')
}
steps {
cleanWs() // Ensure Prepare stage contents cleaned
copyArtifacts filter: '**/OpenJDK*-jdk*.tar.gz,**/OpenJDK*-jdk*.zip',
Expand Down
Loading