Skip to content

Commit

Permalink
Trigger integ-test notification workflow as post action (#5144)
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya authored Oct 26, 2024
1 parent c82b878 commit d90996d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,14 @@ pipeline {
always {
node(AGENT_LABEL) {
script {
def triggerIntegTestNotification =
build job: 'integ-test-notification',
propagate: false,
wait: false,
parameters: [
string(name: 'INPUT_MANIFEST', value: "${env.version}/opensearch-dashboards-${env.version}.yml"),
string(name: 'DISTRIBUTION_NUMBER', value: "${env.buildId}")
]
postCleanup()
}
}
Expand Down
8 changes: 8 additions & 0 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@ pipeline {
always {
node(AGENT_LABEL) {
script {
def triggerIntegTestNotification =
build job: 'integ-test-notification',
propagate: false,
wait: false,
parameters: [
string(name: 'INPUT_MANIFEST', value: "${env.version}/opensearch-${env.version}.yml"),
string(name: 'DISTRIBUTION_NUMBER', value: "${env.buildId}")
]
postCleanup()
}
}
Expand Down
3 changes: 3 additions & 0 deletions tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest {
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 --release-candidate 0 '))
assertCallStack().contains('curl -sSL https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml --output test-results-osd-215/test-report.yml')
assertCallStack().contains('{distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch-dashboards/detail/distribution-build-opensearch-dashboards/215/pipeline, jobName=dummy_job, testReportManifestYml=test-results-osd-215/test-report.yml}')
assertCallStack().contains('integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})')
assertCallStack().contains('integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-dashboards-3.0.0.yml})')
assertCallStack().contains('integ-test.string({name=DISTRIBUTION_NUMBER, value=215})')
}

@Test
Expand Down
3 changes: 3 additions & 0 deletions tests/jenkins/TestOpenSearchIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ class TestOpenSearchIntegTest extends BuildPipelineTest {
assertThat(getCommandExecutions('echo', 'Testing'), hasItem('Testing components: [ml-commons, anomaly-detection, neural-search, security-analytics, security, k-NN, notifications]'))
assertCallStack().contains('curl -sSL https://ci.opensearch.org/ci/dbc/integ-test/3.0.0/9010/linux/x64/tar/test-results/234/integ-test/test-report.yml --output test-results-os-234/test-report.yml')
assertCallStack().contains('{distributionBuildUrl=https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch/detail/distribution-build-opensearch/9010/pipeline, jobName=dummy_job, testReportManifestYml=test-results-os-234/test-report.yml}')
assertCallStack().contains('integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})')
assertCallStack().contains('integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-3.0.0.yml})')
assertCallStack().contains('integ-test.string({name=DISTRIBUTION_NUMBER, value=9010})')
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,5 +472,8 @@
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
integ-test.script(groovy.lang.Closure)
integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-dashboards-3.0.0.yml})
integ-test.string({name=DISTRIBUTION_NUMBER, value=215})
integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
Original file line number Diff line number Diff line change
Expand Up @@ -484,5 +484,8 @@
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
integ-test.script(groovy.lang.Closure)
integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-dashboards-3.0.0.yml})
integ-test.string({name=DISTRIBUTION_NUMBER, value=215})
integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,8 @@
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
integ-test.script(groovy.lang.Closure)
integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-3.0.0.yml})
integ-test.string({name=DISTRIBUTION_NUMBER, value=9010})
integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
Original file line number Diff line number Diff line change
Expand Up @@ -509,5 +509,8 @@
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
integ-test.script(groovy.lang.Closure)
integ-test.string({name=INPUT_MANIFEST, value=3.0.0/opensearch-3.0.0.yml})
integ-test.string({name=DISTRIBUTION_NUMBER, value=9010})
integ-test.build({job=integ-test-notification, propagate=false, wait=false, parameters=[null, null]})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})

0 comments on commit d90996d

Please sign in to comment.