Skip to content

Commit

Permalink
Add Windows IntegTest support on Jenkins Libs
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Sep 13, 2023
1 parent 8b47437 commit 600be51
Show file tree
Hide file tree
Showing 8 changed files with 3,202 additions and 4 deletions.
3,015 changes: 3,015 additions & 0 deletions tests/data/opensearch-2.8.0-build-windows.yml

Large diffs are not rendered by default.

132 changes: 132 additions & 0 deletions tests/data/opensearch-2.8.0-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
schema-version: '1.0'
name: OpenSearch
ci:
image:
name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2
args: -e JAVA_HOME=/opt/java/openjdk-17
components:
- name: alerting
integ-test:
test-configs:
- with-security
- without-security
additional-cluster-configs:
plugins.destination.host.deny_list: [10.0.0.0/8, 127.0.0.1]
bwc-test:
test-configs:
- with-security

- name: anomaly-detection
integ-test:
build-dependencies:
- job-scheduler
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security

- name: asynchronous-search
integ-test:
test-configs:
- with-security
- without-security

- name: cross-cluster-replication
integ-test:
topology:
- cluster_name: leader
data_nodes: 1
cluster_manager_nodes: 0
- cluster_name: follower
data_nodes: 1
cluster_manager_nodes: 0
test-configs:
- with-security
- without-security

- name: geospatial
integ-test:
test-configs:
- with-security
- without-security

- name: index-management
integ-test:
build-dependencies:
- job-scheduler
test-configs:
- with-security
- without-security
additional-cluster-configs:
path.repo: [/tmp]
bwc-test:
test-configs:
- with-security

- name: k-NN
integ-test:
test-configs:
- with-security
- without-security

- name: ml-commons
integ-test:
test-configs:
- with-security
- without-security

- name: neural-search
integ-test:
test-configs:
- with-security
- without-security

- name: notifications
working-directory: notifications
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security

- name: opensearch-observability
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security

- name: opensearch-reports
integ-test:
test-configs:
- with-security
- without-security

- name: security
integ-test:
test-configs:
- with-security

- name: security-analytics
integ-test:
test-configs:
- with-security
- without-security

- name: sql
integ-test:
test-configs:
- with-security
- without-security
additional-cluster-configs:
script.context.field.max_compilations_rate: 1000/1m
bwc-test:
test-configs:
- with-security
17 changes: 17 additions & 0 deletions tests/jenkins/TestRunIntegTestScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,23 @@ class TestRunIntegTestScript extends BuildPipelineTest {
super.testPipeline("tests/jenkins/jobs/RunIntegTestScript_LocalPath_Switch_Non_Root_Jenkinsfile")
}

@Test
void 'IntegTest Windows Zip'() {
this.registerLibTester(new RunIntegTestScriptLibTester(
'dummy_job',
'OpenSearch',
'tests/data/opensearch-2.8.0-build-windows.yml',
'tests/data/opensearch-2.8.0-test.yml',
'',
'',
)
)
super.setUp()
runScript("tests/jenkins/jobs/RunIntegTestScript_Windows_Jenkinsfile")
assertThat(getShellCommands('sh', 'test.sh'), hasItems('env PATH=$PATH ./test.sh integ-test tests/data/opensearch-2.8.0-test.yml --component OpenSearch --test-run-id 987 --paths opensearch=https://ci.opensearch.org/ci/dbc/dummy_job/2.8.0/7923/windows/x64/zip --base-path https://dummy_link/dummy_integ_test/2.8.0/7923/windows/x64/zip '))

}

@Test
void 'IntegTest LocalPath SwitchNonRoot=false'() {
this.registerLibTester(new RunIntegTestScriptLibTester(
Expand Down
4 changes: 3 additions & 1 deletion tests/jenkins/jobs/RunIntegTestScript_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
runIntegTestScript.library({identifier=jenkins@main, retriever=null})
runIntegTestScript.readYaml({file=tests/data/opensearch-1.3.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getArtifactArchitecture()
BuildManifest.getDistribution()
runIntegTestScript.echo(Start integTest for distribution type: tar)
BuildManifest.getArtifactPlatform()
runIntegTestScript.echo(Start integTest on: tar x64 linux)
runIntegTestScript.echo(Possible Java Home: )
runIntegTestScript.echo(Build Id: c3ff7a232d25403fa8cc14c97799c323)
BuildManifest.getArtifactRootUrl(dummy_job, c3ff7a232d25403fa8cc14c97799c323)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
runIntegTestScript.library({identifier=jenkins@main, retriever=null})
runIntegTestScript.readYaml({file=tests/data/opensearch-1.3.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getArtifactArchitecture()
BuildManifest.getDistribution()
runIntegTestScript.echo(Start integTest for distribution type: tar)
BuildManifest.getArtifactPlatform()
runIntegTestScript.echo(Start integTest on: tar x64 linux)
runIntegTestScript.echo(Possible Java Home: )
runIntegTestScript.echo(Build Id: c3ff7a232d25403fa8cc14c97799c323)
BuildManifest.getArtifactRootUrl(dummy_job, c3ff7a232d25403fa8cc14c97799c323)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
runIntegTestScript.library({identifier=jenkins@main, retriever=null})
runIntegTestScript.readYaml({file=tests/data/opensearch-1.3.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getArtifactArchitecture()
BuildManifest.getDistribution()
runIntegTestScript.echo(Start integTest for distribution type: tar)
BuildManifest.getArtifactPlatform()
runIntegTestScript.echo(Start integTest on: tar x64 linux)
runIntegTestScript.detectTestDockerAgent({testManifest=tests/data/opensearch-1.3.0-test.yml})
detectTestDockerAgent.legacySCM(groovy.lang.Closure)
detectTestDockerAgent.library({identifier=jenkins@main, retriever=null})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
runIntegTestScript.library({identifier=jenkins@main, retriever=null})
runIntegTestScript.readYaml({file=tests/data/opensearch-dashboards-1.2.0-build.yml})
BuildManifest.asBoolean()
BuildManifest.getArtifactArchitecture()
BuildManifest.getDistribution()
runIntegTestScript.echo(Start integTest for distribution type: tar)
BuildManifest.getArtifactPlatform()
runIntegTestScript.echo(Start integTest on: tar x64 linux)
runIntegTestScript.echo(Possible Java Home: )
runIntegTestScript.echo(Build Id: 215)
BuildManifest.getArtifactRootUrl(dummy_job, 215)
Expand Down
26 changes: 26 additions & 0 deletions tests/jenkins/jobs/RunIntegTestScript_Windows_Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

pipeline {
agent none
stages {
stage('integ-test') {
steps {
script {
runIntegTestScript(
jobName: 'dummy_job',
componentName: 'OpenSearch',
buildManifest: 'tests/data/opensearch-2.8.0-build-windows.yml',
testManifest: 'tests/data/opensearch-2.8.0-test.yml',
)
}
}
}
}
}

0 comments on commit 600be51

Please sign in to comment.