From fc9fbba974f9b243ebb87e95caaf8dc09864e5f3 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Tue, 1 Oct 2024 15:51:31 -0700 Subject: [PATCH] fix Signed-off-by: Sayali Gaikawad --- vars/UpdateBuildFailureIssues.groovy | 57 +++++++++++++++------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/vars/UpdateBuildFailureIssues.groovy b/vars/UpdateBuildFailureIssues.groovy index 081b2afa..fafc4297 100644 --- a/vars/UpdateBuildFailureIssues.groovy +++ b/vars/UpdateBuildFailureIssues.groovy @@ -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') } }