Skip to content

Commit

Permalink
test
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 14, 2025
1 parent b700ef8 commit 01d7fb2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
4 changes: 2 additions & 2 deletions jenkins/release-workflows/release-branch.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions jenkins/release-workflows/release-chores.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/TestReleaseBranch.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down
11 changes: 5 additions & 6 deletions tests/jenkins/TestReleaseChores.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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:[:]]])
Expand All @@ -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})
Expand Down
Original file line number Diff line number Diff line change
@@ -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:[:]]])
Expand Down

0 comments on commit 01d7fb2

Please sign in to comment.