From 01d7fb251b6c06865c6f996722832867c97e7315 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 14 Feb 2025 15:41:02 -0800 Subject: [PATCH] test Signed-off-by: Sayali Gaikawad --- .../release-workflows/release-branch.jenkinsfile | 4 ++-- .../release-workflows/release-chores.jenkinsfile | 4 ++-- tests/jenkins/TestReleaseBranch.groovy | 4 ++-- tests/jenkins/TestReleaseChores.groovy | 11 +++++------ .../integ-test-notification.jenkinsfile.txt | 14 ++++++++++++++ .../release-branch-buildmanifest.jenkinsfile.txt | 8 +++----- .../release-branch-inputmanifest.jenkinsfile.txt | 4 ++-- 7 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 tests/jenkins/jenkinsjob-regression-files/integ-test-notification.jenkinsfile.txt diff --git a/jenkins/release-workflows/release-branch.jenkinsfile b/jenkins/release-workflows/release-branch.jenkinsfile index eb4a42d032..06aea4f183 100644 --- a/jenkins/release-workflows/release-branch.jenkinsfile +++ b/jenkins/release-workflows/release-branch.jenkinsfile @@ -7,9 +7,9 @@ * compatible open source license. */ -lib = library(identifier: 'jenkins@test-resource', retriever: modernSCM([ +lib = library(identifier: 'jenkins@6.3.3', retriever: modernSCM([ $class: 'GitSCMSource', - remote: 'https://github.com/gaiksaya/opensearch-build-libraries.git', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ])) pipeline { diff --git a/jenkins/release-workflows/release-chores.jenkinsfile b/jenkins/release-workflows/release-chores.jenkinsfile index 16ac210566..5f8917ccd6 100644 --- a/jenkins/release-workflows/release-chores.jenkinsfile +++ b/jenkins/release-workflows/release-chores.jenkinsfile @@ -7,9 +7,9 @@ * compatible open source license. */ -lib = library(identifier: 'jenkins@8.1.1', retriever: modernSCM([ +lib = library(identifier: 'jenkins@fix-string', retriever: modernSCM([ $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', + remote: 'https://github.com/gaiksaya/opensearch-build-libraries.git', ])) pipeline { diff --git a/tests/jenkins/TestReleaseBranch.groovy b/tests/jenkins/TestReleaseBranch.groovy index c0e70b5989..36e622da9c 100644 --- a/tests/jenkins/TestReleaseBranch.groovy +++ b/tests/jenkins/TestReleaseBranch.groovy @@ -28,11 +28,11 @@ class TestReleaseBranch extends BuildPipelineTest { helper.registerSharedLibrary( library().name('jenkins') - .defaultVersion('test-resource') + .defaultVersion('6.3.3') .allowOverride(true) .implicit(true) .targetPath('vars') - .retriever(gitSource('https://github.com/gaiksaya/opensearch-build-libraries.git')) + .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) .build() ) diff --git a/tests/jenkins/TestReleaseChores.groovy b/tests/jenkins/TestReleaseChores.groovy index 513c56a6e8..c8315aae1a 100644 --- a/tests/jenkins/TestReleaseChores.groovy +++ b/tests/jenkins/TestReleaseChores.groovy @@ -27,23 +27,22 @@ class TestReleaseChores extends BuildPipelineTest { void setUp() { helper.registerSharedLibrary( library().name('jenkins') - .defaultVersion('8.1.1') + .defaultVersion('fix-addrc') .allowOverride(true) .implicit(true) .targetPath('vars') - .retriever(gitSource('https://github.com/opensearch-project/opensearch-build-libraries.git')) + .retriever(gitSource('https://github.com/gaiksaya/opensearch-build-libraries.git')) .build() ) super.setUp() - // addParam('RELEASE_VERSION', '2.19.0') - // addParam('RELEASE_CHORE', 'add_rc_details_comment') + addParam('RELEASE_VERSION', '2.19.0') + addParam('RELEASE_CHORE', 'add_rc_details_comment') } @Test public void testCommentAddition() { - super.testPipeline('jenkins/release-workflows/release-chores.jenkinsfile', 'tests/jenkins/jenkinsjob-regression-files/release-workflows/release-chores.jenkinsfile.txt') - binding.setVariable('RELEASE_VERSION', '2.19.0') + super.testPipeline('jenkins/release-workflows/release-chores.jenkinsfile', 'tests/jenkins/jenkinsjob-regression-files/integ-test-notification.jenkinsfile') } // @Test diff --git a/tests/jenkins/jenkinsjob-regression-files/integ-test-notification.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/integ-test-notification.jenkinsfile.txt new file mode 100644 index 0000000000..28f62b162b --- /dev/null +++ b/tests/jenkins/jenkinsjob-regression-files/integ-test-notification.jenkinsfile.txt @@ -0,0 +1,14 @@ + release-chores.run() + release-chores.modernSCM({$class=GitSCMSource, remote=https://github.com/gaiksaya/opensearch-build-libraries.git}) + release-chores.library({identifier=jenkins@fix-string, retriever=null}) + release-chores.pipeline(groovy.lang.Closure) + release-chores.timeout({time=1, unit=HOURS}) + release-chores.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host, image:opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v3, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]]) + release-chores.stage(Parameter check, groovy.lang.Closure) + release-chores.script(groovy.lang.Closure) + release-chores.stage(Add RC details comment, groovy.lang.Closure) + release-chores.script(groovy.lang.Closure) + release-chores.echo(Hello) + release-chores.script(groovy.lang.Closure) + release-chores.postCleanup() + postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) diff --git a/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-buildmanifest.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-buildmanifest.jenkinsfile.txt index bbb0ff6e2a..3384dd91a7 100644 --- a/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-buildmanifest.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-buildmanifest.jenkinsfile.txt @@ -1,6 +1,6 @@ release-branch.run() release-branch.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - release-branch.library({identifier=jenkins@8.1.1, retriever=null}) + release-branch.library({identifier=jenkins@6.3.3, retriever=null}) release-branch.pipeline(groovy.lang.Closure) release-branch.timeout({time=1, unit=HOURS}) release-branch.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host, image:opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v3, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]]) @@ -10,10 +10,8 @@ release-branch.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) release-branch.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/latest/linux/x64/tar/builds/opensearch/manifest.yml, path=tests/jenkins/data/opensearch-1.3.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@8.1.1, retriever=null}) - downloadBuildManifest.sh(mkdir -p $(dirname "tests/jenkins/data/opensearch-1.3.0-build.yml")) - downloadBuildManifest.sh(touch tests/jenkins/data/opensearch-1.3.0-build.yml) - downloadBuildManifest.sh(curl -sSL --retry 5 https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/latest/linux/x64/tar/builds/opensearch/manifest.yml --output tests/jenkins/data/opensearch-1.3.0-build.yml) + downloadBuildManifest.library({identifier=jenkins@6.3.3, retriever=null}) + downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/latest/linux/x64/tar/builds/opensearch/manifest.yml --output tests/jenkins/data/opensearch-1.3.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() release-branch.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) diff --git a/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-inputmanifest.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-inputmanifest.jenkinsfile.txt index ed43d8db18..7f581b1e33 100644 --- a/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-inputmanifest.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/release-workflows/release-branch-inputmanifest.jenkinsfile.txt @@ -1,6 +1,6 @@ release-branch.run() - release-branch.modernSCM({$class=GitSCMSource, remote=https://github.com/gaiksaya/opensearch-build-libraries.git}) - release-branch.library({identifier=jenkins@test-resource, retriever=null}) + release-branch.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) + release-branch.library({identifier=jenkins@6.3.3, retriever=null}) release-branch.pipeline(groovy.lang.Closure) release-branch.timeout({time=1, unit=HOURS}) release-branch.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host, image:opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v3, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])