Skip to content

Commit

Permalink
Close the created autocut issues
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhvigodithi committed Jul 26, 2023
1 parent b422ae0 commit 50f5d1f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
8 changes: 6 additions & 2 deletions jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,10 @@ pipeline {
credentialsId: 'jenkins-build-notice-webhook',
manifest: "${INPUT_MANIFEST}"
)
closeBuildSuccessGithubIssue(
message: buildMessage(search: 'pass'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}

postCleanup()
Expand All @@ -909,14 +913,14 @@ pipeline {
if (params.PUBLISH_NOTIFICATION) {
publishNotification(
icon: ':warning:',
message: buildFailureMessage(),
message: buildMessage(search: 'fail'),
credentialsId: 'jenkins-build-notice-webhook',
manifest: "${INPUT_MANIFEST}"
)
}
if (params.CREATE_GITHUB_ISSUE) {
createGithubIssue(
message: buildFailureMessage()
message: buildMessage(search: 'fail'),
)
}

Expand Down
7 changes: 7 additions & 0 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ pipeline {
buildManifestFileName: BUILD_MANIFEST,
jobName: JOB_NAME
)
String closeCommentMessage = "Closing the issue as the Integration Test passed for ${local_component}<br>Version: ${version}<br>Distribution: ${distribution}<br>Architecture: ${architecture}<br>Platform: ${platform}<br><br>Please check the logs: ${RUN_DISPLAY_URL}<br><br> * Steps to reproduce: See https://github.com/opensearch-project/opensearch-build/tree/main/src/test_workflow#integration-tests<br>* Access components yml file:<br> - [With security](https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/${local_component}/with-security/${local_component}.yml) (if applicable)<br> - [Without security](https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/${local_component}/without-security/${local_component}.yml) (if applicable)<br><br> _Note: All in one test report manifest with all the details coming soon. See https://github.com/opensearch-project/opensearch-build/issues/1274_"
closeGithubIssue(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version} ${distribution} distribution",
closeComment: closeCommentMessage,
label: "autocut,v${version},integ-test-failure"
)
postCleanup()
}
}
Expand Down
8 changes: 6 additions & 2 deletions jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,10 @@ pipeline {
credentialsId: 'jenkins-build-notice-webhook',
manifest: "${INPUT_MANIFEST}"
)
closeBuildSuccessGithubIssue(
message: buildMessage(search: 'pass'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}

postCleanup()
Expand All @@ -954,14 +958,14 @@ pipeline {
if (params.PUBLISH_NOTIFICATION) {
publishNotification(
icon: ':warning:',
message: buildFailureMessage(),
message: buildMessage(search: 'fail'),
credentialsId: 'jenkins-build-notice-webhook',
manifest: "${INPUT_MANIFEST}"
)
}
if (params.CREATE_GITHUB_ISSUE) {
createBuildFailureGithubIssue(
message: buildFailureMessage(),
message: buildMessage(fail),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}
Expand Down
7 changes: 7 additions & 0 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ pipeline {
buildManifestFileName: BUILD_MANIFEST,
jobName: JOB_NAME
)
String closeCommentMessage = "Closing the issue as the Integration Test passed for ${local_component}<br>Version: ${version}<br>Distribution: ${distribution}<br>Architecture: ${architecture}<br>Platform: ${platform}<br><br>Please check the logs: ${RUN_DISPLAY_URL}<br><br> * Steps to reproduce: See https://github.com/opensearch-project/opensearch-build/tree/main/src/test_workflow#integration-tests<br>* Access components yml file:<br> - [With security](https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/${local_component}/with-security/${local_component}.yml) (if applicable)<br> - [Without security](https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/${local_component}/without-security/${local_component}.yml) (if applicable)<br><br> _Note: All in one test report manifest with all the details coming soon. See https://github.com/opensearch-project/opensearch-build/issues/1274_"
closeGithubIssue(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version} ${distribution} distribution",
closeComment: closeCommentMessage,
label: "autocut,v${version},integ-test-failure"
)
postCleanup()
}
}
Expand Down
1 change: 1 addition & 0 deletions src/run_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def main() -> int:
builder.checkout(work_dir.name)
builder.build(build_recorder)
builder.export_artifacts(build_recorder)
logging.info(f"Build successful {component.name}")
except:
logging.error(f"Error building {component.name}, retry with: {args.component_command(component.name)}")
raise
Expand Down

0 comments on commit 50f5d1f

Please sign in to comment.