Skip to content

Commit

Permalink
Publish Bug
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Jul 24, 2024
1 parent 1040501 commit f1cba32
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 123 deletions.
16 changes: 8 additions & 8 deletions jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: '[email protected].0', retriever: modernSCM([
lib = library(identifier: '[email protected].1', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -946,13 +946,6 @@ pipeline {
node(AGENT_LINUX_X64) {
checkout scm
script {
if (params.UPDATE_GITHUB_ISSUE) {
UpdateBuildFailureIssues(
failureMessages: buildMessage(search: 'Error building'),
passMessages: buildMessage(search: 'Successfully built'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}
def rc = (params.RC_NUMBER.toInteger() > 0)
publishDistributionBuildResults(
failureMessages: buildMessage(search: 'Error building'),
Expand All @@ -962,6 +955,13 @@ pipeline {
rcNumber: env.RC_NUMBER,
componentCategory: "OpenSearch Dashboards"
)
if (params.UPDATE_GITHUB_ISSUE) {
UpdateBuildFailureIssues(
failureMessages: buildMessage(search: 'Error building'),
passMessages: buildMessage(search: 'Successfully built'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}
postCleanup()
}
}
Expand Down
5 changes: 3 additions & 2 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: '[email protected].0', retriever: modernSCM([
lib = library(identifier: '[email protected].1', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -359,7 +359,7 @@ pipeline {
testType: "integ-test",
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
stash includes: 'test-report.yml', name: "test-report-$BUILD_NUMBER"
archiveArtifacts artifacts: 'test-report.yml'
}
Expand All @@ -373,6 +373,7 @@ pipeline {
distributionBuildNumber: env.buildId,
distributionBuildUrl: "https://build.ci.opensearch.org/blue/organizations/jenkins/${env.BUILD_JOB_NAME}/detail/${env.BUILD_JOB_NAME}/${env.buildId}/pipeline",
rc: rc,
jobName: env.JOB_NAME,
rcNumber: env.RC_NUMBER,
platform: env.platform,
architecture: env.architecture,
Expand Down
16 changes: 8 additions & 8 deletions jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: '[email protected].0', retriever: modernSCM([
lib = library(identifier: '[email protected].1', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -891,13 +891,6 @@ pipeline {
node(AGENT_LINUX_X64) {
checkout scm
script {
if (params.UPDATE_GITHUB_ISSUE) {
UpdateBuildFailureIssues(
failureMessages: buildMessage(search: 'Error building'),
passMessages: buildMessage(search: 'Successfully built'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}
def rc = (params.RC_NUMBER.toInteger() > 0)
publishDistributionBuildResults(
failureMessages: buildMessage(search: 'Error building'),
Expand All @@ -907,6 +900,13 @@ pipeline {
rcNumber: env.RC_NUMBER,
componentCategory: "OpenSearch"
)
if (params.UPDATE_GITHUB_ISSUE) {
UpdateBuildFailureIssues(
failureMessages: buildMessage(search: 'Error building'),
passMessages: buildMessage(search: 'Successfully built'),
inputManifestPath: "manifests/$INPUT_MANIFEST"
)
}
postCleanup()
}

Expand Down
3 changes: 2 additions & 1 deletion jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: '[email protected].0', retriever: modernSCM([
lib = library(identifier: '[email protected].1', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -324,6 +324,7 @@ pipeline {
distributionBuildNumber: env.buildId,
distributionBuildUrl: "https://build.ci.opensearch.org/blue/organizations/jenkins/${env.BUILD_JOB_NAME}/detail/${env.BUILD_JOB_NAME}/${env.buildId}/pipeline",
rc: rc,
jobName: env.JOB_NAME,
rcNumber: env.RC_NUMBER,
platform: env.platform,
architecture: env.architecture,
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest {

helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.7.0')
.defaultVersion('6.7.1')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -115,7 +115,7 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest {
'env PATH=$PATH ./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --component observabilityDashboards --test-run-id 215 --paths opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar '.toString()
))
assertThat(getCommandExecutions('sh', 'report.sh'), hasItems('./report.sh manifests/tests/jenkins/data/opensearch-dashboards-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/215/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/3.0.0/215/linux/x64/tar --test-run-id 215 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/215/linux/x64/tar '))
assertCallStack().contains('{version=3.0.0, distributionBuildNumber=215, distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch-dashboards/detail/distribution-build-opensearch-dashboards/215/pipeline, rc=false, rcNumber=null, platform=linux, architecture=x64, distribution=tar, testReportManifestYml=test-report.yml}')
assertCallStack().contains('{version=3.0.0, distributionBuildNumber=215, distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch-dashboards/detail/distribution-build-opensearch-dashboards/215/pipeline, rc=false, jobName=dummy_job, rcNumber=null, platform=linux, architecture=x64, distribution=tar, testReportManifestYml=test-report.yml}')
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/TestOpenSearchIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest {

helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.7.0')
.defaultVersion('6.7.1')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -95,7 +95,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest {
assertThat(getCommandExecutions('sh', 'test.sh'), hasItem('env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-3.0.0-test.yml --component k-NN --test-run-id 234 --paths opensearch=/tmp/workspace/tar --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/9010/linux/x64/tar '))
assertThat(getCommandExecutions('sh', 'report.sh'), hasItem('./report.sh manifests/tests/jenkins/data/opensearch-3.0.0-test.yml --artifact-paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/9010/linux/x64/tar --test-run-id 234 --test-type integ-test --base-path DUMMY_PUBLIC_ARTIFACT_URL/dummy_job/3.0.0/9010/linux/x64/tar '))
assertThat(getCommandExecutions('echo', 'Testing'), hasItem('Testing components: [ml-commons, anomaly-detection, neural-search, security-analytics, security, k-NN, notifications]'))
assertCallStack().contains('{version=3.0.0, distributionBuildNumber=9010, distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch/detail/distribution-build-opensearch/9010/pipeline, rc=false, rcNumber=null, platform=linux, architecture=x64, distribution=tar, testReportManifestYml=test-report.yml}')
assertCallStack().contains('{version=3.0.0, distributionBuildNumber=9010, distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch/detail/distribution-build-opensearch/9010/pipeline, rc=false, jobName=dummy_job, rcNumber=null, platform=linux, architecture=x64, distribution=tar, testReportManifestYml=test-report.yml}')
}

@Test
Expand Down
Loading

0 comments on commit f1cba32

Please sign in to comment.