Skip to content

Commit

Permalink
Enable issue notification and labelling for all distributions
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
  • Loading branch information
gaiksaya committed Feb 6, 2024
1 parent 6469398 commit d3918ec
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ pipeline {
env.artifactPath = buildManifestObj.getArtifactRoot(BUILD_JOB_NAME, buildId)
env.artifactPathOpenSearch = buildManifestObjOpenSearch.getArtifactRoot(BUILD_JOB_NAME_OPENSEARCH, buildIdOpenSearch)
env.AGENT_LABEL = agent_nodes["${env.platform}_${architecture}"]
env.updateGithubIssues = (params.UPDATE_GITHUB_ISSUES && (env.distribution == 'tar'))
echo "GitHub issue update is set to : ${env.updateGithubIssues.toBoolean()}"

echo "Version: ${version}, VersionOpenSearch: ${versionOpenSearch}, Agent: ${AGENT_LABEL}, OSD_BuildId: ${buildId}, OS_BuildId: ${buildIdOpenSearch}, Distribution: ${distribution}"
currentBuild.description = "$architecture, $platform, osd-$version-$buildId, os-$versionOpenSearch-$buildIdOpenSearch, $distribution"
Expand Down Expand Up @@ -256,7 +254,7 @@ pipeline {
localPath: "${WORKSPACE}/${distribution}",
switchUserNonRoot: "${switch_user_non_root}"
)
if (env.updateGithubIssues.toBoolean()) {
if (params.UPDATE_GITHUB_ISSUES) {
updateGitHubIssueLabels(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version}",
Expand All @@ -268,7 +266,7 @@ pipeline {
} catch (e) {
echo "Error running integtest for component ${local_component}, creating Github issue"
String issueBodyMessage = "The integration test failed at distribution level for component ${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> * Test-report manifest:*<br> - https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/test-report.yml <br><br> _Note: Steps to reproduce, additional logs and other files can be found within the above test-report manifest. <br>Instructions of this test-report manifest can be found [here](https://github.com/opensearch-project/opensearch-build/tree/main/src/report_workflow#guide-on-test-report-manifest-from-ci)._"
if (env.updateGithubIssues.toBoolean()) {
if (params.UPDATE_GITHUB_ISSUES) {
createGithubIssue(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version}",
Expand Down
6 changes: 2 additions & 4 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ pipeline {
env.platform = buildManifestObj.build.platform
env.artifactPath = buildManifestObj.getArtifactRoot(BUILD_JOB_NAME, buildId)
env.AGENT_LABEL = agent_nodes["${env.platform}_${architecture}"]
env.updateGithubIssues = (params.UPDATE_GITHUB_ISSUES && (env.distribution == 'tar'))
echo "GitHub issue update is set to : ${env.updateGithubIssues.toBoolean()}"
}
}
post {
Expand Down Expand Up @@ -210,7 +208,7 @@ pipeline {
localPath: "${WORKSPACE}/${distribution}",
switchUserNonRoot: "${switch_user_non_root}"
)
if (env.updateGithubIssues.toBoolean()) {
if (params.UPDATE_GITHUB_ISSUES) {
updateGitHubIssueLabels(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version}",
Expand All @@ -222,7 +220,7 @@ pipeline {
} catch (e) {
echo "Error running integtest for component ${local_component}, creating Github issue"
String issueBodyMessage = "The integration test failed at distribution level for component ${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> * Test-report manifest:*<br> - https://ci.opensearch.org/ci/dbc/${JOB_NAME}/${version}/${buildId}/${platform}/${architecture}/${distribution}/test-results/${BUILD_NUMBER}/integ-test/test-report.yml <br><br> _Note: Steps to reproduce, additional logs and other files can be found within the above test-report manifest. <br>Instructions of this test-report manifest can be found [here](https://github.com/opensearch-project/opensearch-build/tree/main/src/report_workflow#guide-on-test-report-manifest-from-ci)._"
if (env.updateGithubIssues.toBoolean()) {
if (params.UPDATE_GITHUB_ISSUES) {
createGithubIssue(
repoUrl: buildManifestObj.getRepo("${local_component}"),
issueTitle: "[AUTOCUT] Integration Test failed for ${local_component}: ${version}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
BuildManifest.getDistribution()
BuildManifest.getArtifactRoot(distribution-build-opensearch-dashboards, 215)
BuildManifest.getArtifactRoot(distribution-build-opensearch, 215)
integ-test.echo(GitHub issue update is set to : false)
integ-test.echo(Version: 3.0.0, VersionOpenSearch: 3.0.0, Agent: Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, OSD_BuildId: 215, OS_BuildId: 215, Distribution: tar)
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
BuildManifest.getArtifactBuildId()
BuildManifest.getDistribution()
BuildManifest.getArtifactRoot(distribution-build-opensearch, 9010)
integ-test.echo(GitHub issue update is set to : true)
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.stage(integ-test, groovy.lang.Closure)
Expand Down

0 comments on commit d3918ec

Please sign in to comment.