diff --git a/tests/jenkins/TestbuildManifestVar.groovy b/tests/jenkins/TestbuildManifestVar.groovy index b258263edc..3c39e849ea 100644 --- a/tests/jenkins/TestbuildManifestVar.groovy +++ b/tests/jenkins/TestbuildManifestVar.groovy @@ -14,7 +14,7 @@ class TestbuildManifestVar extends BuildPipelineTest { @Test void testbuildManifest() { - super.testPipeline("tests/jenkins/jobs/buildShManifest_Jenkinsfile") + super.testPipeline("tests/jenkins/jobs/BuildShManifest_Jenkinsfile") } } diff --git a/tests/jenkins/data/opensearch-2.0.0.yml b/tests/jenkins/data/opensearch-2.0.0.yml index 43bedd19c6..d05e59b422 100644 --- a/tests/jenkins/data/opensearch-2.0.0.yml +++ b/tests/jenkins/data/opensearch-2.0.0.yml @@ -6,7 +6,7 @@ build: qualifier: alpha1 ci: image: - name: opensearchstaging/ci-runner:ci-runner-centos7-v1 + name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2 args: -e JAVA_HOME=/opt/java/openjdk-17 components: - name: OpenSearch @@ -15,3 +15,15 @@ components: checks: - gradle:publish - gradle:properties:version + - name: common-utils + repository: https://github.com/opensearch-project/common-utils.git + ref: '2.0' + checks: + - gradle:publish + - gradle:properties:version + - name: job-scheduler + repository: https://github.com/opensearch-project/job-scheduler.git + ref: '2.0' + checks: + - gradle:properties:version + - gradle:dependencies:opensearch.version diff --git a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile new file mode 100644 index 0000000000..174bf7fc6d --- /dev/null +++ b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile @@ -0,0 +1,29 @@ +pipeline { + agent none + stages { + stage('Test build manifest jenkins var') { + steps { + script { + buildManifest( + inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", + distribution: "tar", + snapshot: true + ) + buildManifest( + componentName: "job-scheduler", + inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", + distribution: "tar", + snapshot: true + ) + buildManifest( + componentName: "common-utils", + inputManifest: "tests/jenkins/data/opensearch-2.0.0.yml", + distribution: "rpm", + snapshot: true + ) + } + } + } + } +} + diff --git a/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt new file mode 100644 index 0000000000..0715c60bbc --- /dev/null +++ b/tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt @@ -0,0 +1,11 @@ + BuildShManifest_Jenkinsfile.run() + BuildShManifest_Jenkinsfile.pipeline(groovy.lang.Closure) + BuildShManifest_Jenkinsfile.echo(Executing on agent [label:none]) + BuildShManifest_Jenkinsfile.stage(Test build manifest jenkins var, groovy.lang.Closure) + BuildShManifest_Jenkinsfile.script(groovy.lang.Closure) + BuildShManifest_Jenkinsfile.buildManifest({inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=tar, snapshot=true}) + buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d tar --snapshot) + BuildShManifest_Jenkinsfile.buildManifest({componentName=job-scheduler, inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=tar, snapshot=true}) + buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d tar --component job-scheduler --snapshot) + BuildShManifest_Jenkinsfile.buildManifest({componentName=common-utils, inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, distribution=rpm, snapshot=true}) + buildManifest.sh(./build.sh tests/jenkins/data/opensearch-2.0.0.yml -d rpm --component common-utils --snapshot) diff --git a/tests/jenkins/jobs/buildShManifest_Jenkinsfile b/tests/jenkins/jobs/buildShManifest_Jenkinsfile deleted file mode 100644 index c6e7ddc8f3..0000000000 --- a/tests/jenkins/jobs/buildShManifest_Jenkinsfile +++ /dev/null @@ -1,28 +0,0 @@ -pipeline { - agent none - stages { - stage('Test build manifest jenkins var') { - steps { - script { - try { - def status = buildManifest( - componentName: "job-scheduler", - inputManifest: "manifests/2.0.0/opensearch-2.0.0.yml", - distribution: "tar", - snapshot: true - ) - if (status > 0) { - currentBuild.result = 'UNSTABLE' - }else { - currentBuild.result = 'SUCCESS' - } - } catch (Exception err) { - println(err) - currentBuild.result = 'FAILURE' - } - } - } - } - } -} - diff --git a/tests/jenkins/jobs/buildShManifest_Jenkinsfile.txt b/tests/jenkins/jobs/buildShManifest_Jenkinsfile.txt deleted file mode 100644 index 2510408740..0000000000 --- a/tests/jenkins/jobs/buildShManifest_Jenkinsfile.txt +++ /dev/null @@ -1,7 +0,0 @@ - buildShManifest_Jenkinsfile.run() - buildShManifest_Jenkinsfile.pipeline(groovy.lang.Closure) - buildShManifest_Jenkinsfile.echo(Executing on agent [label:none]) - buildShManifest_Jenkinsfile.stage(Test build manifest jenkins var, groovy.lang.Closure) - buildShManifest_Jenkinsfile.script(groovy.lang.Closure) - buildShManifest_Jenkinsfile.buildManifest({componentName=job-scheduler, inputManifest=manifests/2.0.0/opensearch-2.0.0.yml, distribution=tar, snapshot=true}) - buildManifest.sh(./build.sh manifests/2.0.0/opensearch-2.0.0.yml -d tar --component job-scheduler --snapshot)