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

Prevent build_job_generator regeneration from blowing up if no targetConfigurations #1162

Merged
merged 1 commit into from
Dec 11, 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
8 changes: 6 additions & 2 deletions pipelines/build/regeneration/build_job_generator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ node('worker') {
checkoutUserPipelines()
}

if (jenkinsCreds != '') {
if (targetConfigurations.size() == 0) {
println "[WARNING] No targetConfigurations to be generated for this version"
} else {
if (jenkinsCreds != '') {
withCredentials([usernamePassword(
credentialsId: "${JENKINS_AUTH}",
usernameVariable: 'jenkinsUsername',
Expand Down Expand Up @@ -240,7 +243,7 @@ node('worker') {
jobType
).regenerate()
}
} else {
} else {
println '[WARNING] No Jenkins API Credentials have been provided! If your server does not have anonymous read enabled, you may encounter 403 api request error code.'
regenerationScript(
javaVersion,
Expand All @@ -263,6 +266,7 @@ node('worker') {
checkoutCreds,
jobType
).regenerate()
}
}
println '[SUCCESS] All done!'
} finally {
Expand Down
Loading