Skip to content

Instantly share code, notes, and snippets.

@cprice404
Created November 1, 2016 18:20
Show Gist options
  • Save cprice404/1fa41d3eafb9386487a482769e1046a5 to your computer and use it in GitHub Desktop.
Save cprice404/1fa41d3eafb9386487a482769e1046a5 to your computer and use it in GitHub Desktop.
jobdsl configure called three times
def job = workflowJob(job_prefix) {
parameters {
...
}
definition {
cpsScm {
scm {
git {
remote {
url(git_repo)
}
branch(git_branch)
}
}
scriptPath(relative_jenkinsfile)
}
}
logRotator {
numToKeep(50)
}
}
job.with {
out.println("IN JOB.WITH BLOCK")
triggers {
scm('H H(21-22) * * 1')
}
configure { Node project ->
out.println("EXECUTING JOB CONFIGURE")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment