Skip to content

Commit

Permalink
Tweak integTest to use 4.1.1 libs for OS/OSD runs (#3445)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Apr 26, 2023
1 parent 9a483f8 commit 6a62ce5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -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',
]))
Expand Down
2 changes: 1 addition & 1 deletion jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -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',
]))
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestOpenSearchDashboardsIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
8 changes: 4 additions & 4 deletions tests/jenkins/TestOpenSearchIntegTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand All @@ -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')
Expand All @@ -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')
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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})
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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})
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -67,32 +67,32 @@
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)
runIntegTestScript.echo(User provides localPath, use local artifacts: /tmp/workspace/tar)
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)
Expand Down

0 comments on commit 6a62ce5

Please sign in to comment.