Skip to content

Commit

Permalink
Add tests without component parameter and for rpm distribution.
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
  • Loading branch information
zelinh committed May 9, 2022
1 parent c37098d commit 97d63c8
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 37 deletions.
2 changes: 1 addition & 1 deletion tests/jenkins/TestbuildManifestVar.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

14 changes: 13 additions & 1 deletion tests/jenkins/data/opensearch-2.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
29 changes: 29 additions & 0 deletions tests/jenkins/jobs/BuildShManifest_Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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
)
}
}
}
}
}

11 changes: 11 additions & 0 deletions tests/jenkins/jobs/BuildShManifest_Jenkinsfile.txt
Original file line number Diff line number Diff line change
@@ -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)
28 changes: 0 additions & 28 deletions tests/jenkins/jobs/buildShManifest_Jenkinsfile

This file was deleted.

7 changes: 0 additions & 7 deletions tests/jenkins/jobs/buildShManifest_Jenkinsfile.txt

This file was deleted.

0 comments on commit 97d63c8

Please sign in to comment.