diff --git a/jenkins/opensearch-dashboards/integ-test.jenkinsfile b/jenkins/opensearch-dashboards/integ-test.jenkinsfile index b2f46accaf..b9f928bb42 100644 --- a/jenkins/opensearch-dashboards/integ-test.jenkinsfile +++ b/jenkins/opensearch-dashboards/integ-test.jenkinsfile @@ -1,4 +1,4 @@ -lib = library(identifier: 'jenkins@2.1.0', retriever: modernSCM([ +lib = library(identifier: 'jenkins@4.1.1', retriever: modernSCM([ $class: 'GitSCMSource', remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ])) diff --git a/jenkins/opensearch/integ-test.jenkinsfile b/jenkins/opensearch/integ-test.jenkinsfile index 97222d28d8..e45e4d3658 100644 --- a/jenkins/opensearch/integ-test.jenkinsfile +++ b/jenkins/opensearch/integ-test.jenkinsfile @@ -1,4 +1,4 @@ -lib = library(identifier: 'jenkins@4.0.0', retriever: modernSCM([ +lib = library(identifier: 'jenkins@4.1.1', retriever: modernSCM([ $class: 'GitSCMSource', remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ])) diff --git a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy index e76dfe102f..82b3809286 100644 --- a/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy @@ -19,7 +19,7 @@ class TestOpenSearchDashboardsIntegTest extends BuildPipelineTest { helper.registerSharedLibrary( library().name('jenkins') - .defaultVersion('2.1.0') + .defaultVersion('4.1.1') .allowOverride(true) .implicit(true) .targetPath('vars') diff --git a/tests/jenkins/TestOpenSearchIntegTest.groovy b/tests/jenkins/TestOpenSearchIntegTest.groovy index 6788d3f5bc..1270bde0b9 100644 --- a/tests/jenkins/TestOpenSearchIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchIntegTest.groovy @@ -23,7 +23,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { helper.registerSharedLibrary( library().name('jenkins') - .defaultVersion('4.0.0') + .defaultVersion('4.1.1') .allowOverride(true) .implicit(true) .targetPath('vars') @@ -83,7 +83,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { void integTests_runs_consistently() { super.testPipeline('jenkins/opensearch/integ-test.jenkinsfile', 'tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile') - assertThat(getCommandExecutions('sh', 'test.sh'), hasItem(' env JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ')) + assertThat(getCommandExecutions('sh', 'test.sh'), hasItem('env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ')) } @Test @@ -102,7 +102,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { @Test void checkGHissueCreation() { - helper.addShMock(' env JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ', '', 1) + helper.addShMock('env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ', '', 1) helper.addShMock('gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S "[AUTOCUT] Integration Test failed for OpenSearch: 1.3.0 tar distribution in:title" --label autocut,v1.3.0,integ-test-failure', '', 0) assertThrows(Exception) { runScript('jenkins/opensearch/integ-test.jenkinsfile') @@ -113,7 +113,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { @Test void checkGHexistingIssue() { - helper.addShMock(' env JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ', '', 1) + helper.addShMock('env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ', '', 1) assertThrows(Exception) { runScript('jenkins/opensearch/integ-test.jenkinsfile') } diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt index c86e9b3fcb..e5b28c268b 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch-dashboards/integ-test.jenkinsfile.txt @@ -1,6 +1,6 @@ integ-test.run() integ-test.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - integ-test.library({identifier=jenkins@2.1.0, retriever=null}) + integ-test.library({identifier=jenkins@4.1.1, retriever=null}) integ-test.pipeline(groovy.lang.Closure) integ-test.credentials(jenkins-artifact-bucket-name) integ-test.timeout({time=4, unit=HOURS}) @@ -11,13 +11,13 @@ integ-test.fileExists(manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@2.1.0, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@4.1.1, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() integ-test.downloadBuildManifest({url=null, path=build-manifest-opensearch.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@2.1.0, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@4.1.1, retriever=null}) downloadBuildManifest.sh(curl -sSL null --output build-manifest-opensearch.yml) downloadBuildManifest.readYaml({file=build-manifest-opensearch.yml}) BuildManifest.asBoolean() @@ -37,7 +37,7 @@ integ-test.script(groovy.lang.Closure) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@2.1.0, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@4.1.1, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() @@ -58,7 +58,7 @@ integ-test.sh(cp -a /tmp/workspace/artifacts/distribution-build-opensearch-dashboards/1.2.0/215/linux/x64/tar /tmp/workspace) integ-test.runIntegTestScript({jobName=distribution-build-opensearch-dashboards, componentName=functionalTestDashboards, buildManifest=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml, localPath=/tmp/workspace/tar, switchUserNonRoot=false}) runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@2.1.0, retriever=null}) + runIntegTestScript.library({identifier=jenkins@4.1.1, retriever=null}) runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() BuildManifest.getDistribution() @@ -71,12 +71,12 @@ runIntegTestScript.echo(Paths: opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar) runIntegTestScript.echo(Component: functionalTestDashboards) runIntegTestScript.echo(Switch User to Non-Root (uid=1000): false) - runIntegTestScript.echo(Run command: ./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 215 --paths opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar ) - runIntegTestScript.sh( ./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 215 --paths opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar ) + runIntegTestScript.echo(Run command: env PATH=$PATH ./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 215 --paths opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar ) + runIntegTestScript.sh(env PATH=$PATH ./test.sh integ-test manifests/tests/jenkins/data/opensearch-dashboards-1.2.0-test.yml --component functionalTestDashboards --test-run-id 215 --paths opensearch=/tmp/workspace/tar opensearch-dashboards=/tmp/workspace/tar ) integ-test.script(groovy.lang.Closure) integ-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@2.1.0, retriever=null}) + uploadTestResults.library({identifier=jenkins@4.1.1, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-dashboards-1.2.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 215) diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt index 1d64a612be..64517cf5ad 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt @@ -1,6 +1,6 @@ integ-test.run() integ-test.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) - integ-test.library({identifier=jenkins@4.0.0, retriever=null}) + integ-test.library({identifier=jenkins@4.1.1, retriever=null}) integ-test.pipeline(groovy.lang.Closure) integ-test.credentials(jenkins-artifact-bucket-name) integ-test.timeout({time=3, unit=HOURS}) @@ -21,7 +21,7 @@ integ-test.fileExists(manifests/tests/jenkins/data/opensearch-1.3.0-test.yml) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-1.3.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@4.0.0, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@4.1.1, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-1.3.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() @@ -40,7 +40,7 @@ integ-test.script(groovy.lang.Closure) integ-test.downloadBuildManifest({url=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, path=tests/jenkins/data/opensearch-1.3.0-build.yml}) downloadBuildManifest.legacySCM(groovy.lang.Closure) - downloadBuildManifest.library({identifier=jenkins@4.0.0, retriever=null}) + downloadBuildManifest.library({identifier=jenkins@4.1.1, retriever=null}) downloadBuildManifest.sh(curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz --output tests/jenkins/data/opensearch-1.3.0-build.yml) downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() @@ -67,19 +67,19 @@ integ-test.sh(rm -rf test-results) integ-test.runIntegTestScript({jobName=distribution-build-opensearch, componentName=OpenSearch, buildManifest=tests/jenkins/data/opensearch-1.3.0-build.yml, testManifest=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml, localPath=/tmp/workspace/tar, switchUserNonRoot=false}) runIntegTestScript.legacySCM(groovy.lang.Closure) - runIntegTestScript.library({identifier=jenkins@4.0.0, retriever=null}) + runIntegTestScript.library({identifier=jenkins@4.1.1, retriever=null}) runIntegTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() BuildManifest.getDistribution() runIntegTestScript.echo(Start integTest for distribution type: tar) - runIntegTestScript.detectTestDockerAgent() + runIntegTestScript.detectTestDockerAgent({testManifest=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml}) detectTestDockerAgent.legacySCM(groovy.lang.Closure) - detectTestDockerAgent.library({identifier=jenkins@4.0.0, retriever=null}) + detectTestDockerAgent.library({identifier=jenkins@4.1.1, retriever=null}) detectTestDockerAgent.readYaml({file=manifests/tests/jenkins/data/opensearch-1.3.0-test.yml}) TestManifest.asBoolean() detectTestDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) detectTestDockerAgent.echo(Using java version openjdk-17) - runIntegTestScript.echo(Possible Java Home: env JAVA_HOME=/opt/java/openjdk-17) + runIntegTestScript.echo(Possible Java Home: JAVA_HOME=/opt/java/openjdk-17) runIntegTestScript.echo(Build Id: 717) BuildManifest.getArtifactRootUrl(distribution-build-opensearch, 717) runIntegTestScript.echo(Artifact root URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/717/linux/x64/tar) @@ -87,12 +87,12 @@ runIntegTestScript.echo(Paths: opensearch=/tmp/workspace/tar) runIntegTestScript.echo(Component: OpenSearch) runIntegTestScript.echo(Switch User to Non-Root (uid=1000): false) - runIntegTestScript.echo(Run command: env JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ) - runIntegTestScript.sh( env JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ) + runIntegTestScript.echo(Run command: env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ) + runIntegTestScript.sh(env PATH=$PATH JAVA_HOME=/opt/java/openjdk-17 ./test.sh integ-test manifests/tests/jenkins/data/opensearch-1.3.0-test.yml --component OpenSearch --test-run-id 234 --paths opensearch=/tmp/workspace/tar ) integ-test.echo(Completed running integtest for component OpenSearch) integ-test.uploadTestResults({buildManifestFileName=tests/jenkins/data/opensearch-1.3.0-build.yml, jobName=dummy_job}) uploadTestResults.legacySCM(groovy.lang.Closure) - uploadTestResults.library({identifier=jenkins@4.0.0, retriever=null}) + uploadTestResults.library({identifier=jenkins@4.1.1, retriever=null}) uploadTestResults.readYaml({file=tests/jenkins/data/opensearch-1.3.0-build.yml}) BuildManifest.asBoolean() uploadTestResults.echo(Build Id: 717)