Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Oct 1, 2024
1 parent 83b348d commit fc9fbba
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions vars/UpdateBuildFailureIssues.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,35 @@ void call(Map args = [:]) {
failedComponents = failedComponents.unique()
passedComponents = passedComponents.unique()

for (component in inputManifest.components) {
if (failedComponents.contains(component.name)) {
println("Component ${component.name} failed, creating github issue")
ghIssueBody = """***Build Failed Error***: **${component.name} failed during the distribution build for version: ${currentVersion}.**
Please see build log at ${env.RUN_DISPLAY_URL}.
The failed build stage will be marked as unstable :warning: . Please see ./build.sh step for more details.
Checkout the [wiki](https://github.com/opensearch-project/opensearch-build/wiki/Building-an-OpenSearch-and-OpenSearch-Dashboards-Distribution) to reproduce the failure locally.""".stripIndent()
createGithubIssue(
repoUrl: component.repository,
issueTitle: "[AUTOCUT] Distribution Build Failed for ${component.name}-${currentVersion}",
issueBody: ghIssueBody,
label: "autocut,v${currentVersion}",
issueEdit: true
)
}
// if (passedComponents.contains(component.name) && !failedComponents.contains(component.name)) {
// println("Component ${component.name} passed, closing github issue")
// ghIssueBody = """Closing the issue as the distribution build for ${component.name} has passed for version: **${currentVersion}**.
// Please see build log at ${env.RUN_DISPLAY_URL}""".stripIndent()
// closeGithubIssue(
// repoUrl: component.repository,
// issueTitle: "[AUTOCUT] Distribution Build Failed for ${component.name}-${currentVersion}",
// closeComment: ghIssueBody,
// label: "autocut,v${currentVersion}"
// )
// }
sleep(time:3, unit:'SECONDS')
println(failedComponents)
println(passedComponents)

// for (component in inputManifest.components) {
// if (failedComponents.contains(component.name)) {
// println("Component ${component.name} failed, creating github issue")
// ghIssueBody = """***Build Failed Error***: **${component.name} failed during the distribution build for version: ${currentVersion}.**
// Please see build log at ${env.RUN_DISPLAY_URL}.
// The failed build stage will be marked as unstable :warning: . Please see ./build.sh step for more details.
// Checkout the [wiki](https://github.com/opensearch-project/opensearch-build/wiki/Building-an-OpenSearch-and-OpenSearch-Dashboards-Distribution) to reproduce the failure locally.""".stripIndent()
// createGithubIssue(
// repoUrl: component.repository,
// issueTitle: "[AUTOCUT] Distribution Build Failed for ${component.name}-${currentVersion}",
// issueBody: ghIssueBody,
// label: "autocut,v${currentVersion}",
// issueEdit: true
// )
// }
// // if (passedComponents.contains(component.name) && !failedComponents.contains(component.name)) {
// // println("Component ${component.name} passed, closing github issue")
// // ghIssueBody = """Closing the issue as the distribution build for ${component.name} has passed for version: **${currentVersion}**.
// // Please see build log at ${env.RUN_DISPLAY_URL}""".stripIndent()
// // closeGithubIssue(
// // repoUrl: component.repository,
// // issueTitle: "[AUTOCUT] Distribution Build Failed for ${component.name}-${currentVersion}",
// // closeComment: ghIssueBody,
// // label: "autocut,v${currentVersion}"
// // )
// // }
// sleep(time:3, unit:'SECONDS')
}
}

0 comments on commit fc9fbba

Please sign in to comment.