From 7807437cf6da7dbd56b50c0bda8fe719664cd708 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:43:20 -0700 Subject: [PATCH] Add test manifest in cron for 3.0.0 and add parameterized cron for 2.7.0 (#3335) Signed-off-by: Sayali Gaikawad --- jenkins/check-for-build.jenkinsfile | 2 +- jenkins/opensearch/integ-test.jenkinsfile | 6 ++++++ tests/jenkins/TestOpenSearchIntegTest.groovy | 1 + .../opensearch/integ-test.jenkinsfile.txt | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jenkins/check-for-build.jenkinsfile b/jenkins/check-for-build.jenkinsfile index 568ec792e4..6c952aee83 100644 --- a/jenkins/check-for-build.jenkinsfile +++ b/jenkins/check-for-build.jenkinsfile @@ -19,7 +19,7 @@ pipeline { H 1 * * * %INPUT_MANIFEST=2.7.0/opensearch-2.7.0.yml;TEST_MANIFEST=2.7.0/opensearch-2.7.0-test.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip H 1 * * * %INPUT_MANIFEST=1.4.0/opensearch-1.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm zip H 1 * * * %INPUT_MANIFEST=1.4.0/opensearch-dashboards-1.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards;BUILD_PLATFORM=linux windows;BUILD_DISTRIBUTION=tar rpm zip - H 1 * * * %INPUT_MANIFEST=3.0.0/opensearch-3.0.0.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip + H 1 * * * %INPUT_MANIFEST=3.0.0/opensearch-3.0.0.yml;TEST_MANIFEST=3.0.0/opensearch-3.0.0-test.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip H 1 * * * %INPUT_MANIFEST=3.0.0/opensearch-dashboards-3.0.0.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards;BUILD_PLATFORM=linux windows;BUILD_DISTRIBUTION=tar rpm deb zip ''' } diff --git a/jenkins/opensearch/integ-test.jenkinsfile b/jenkins/opensearch/integ-test.jenkinsfile index 8d431f2480..d82cb9c9d1 100644 --- a/jenkins/opensearch/integ-test.jenkinsfile +++ b/jenkins/opensearch/integ-test.jenkinsfile @@ -28,6 +28,12 @@ pipeline { BUILD_JOB_NAME = "distribution-build-opensearch" ARTIFACT_BUCKET_NAME = credentials('jenkins-artifact-bucket-name') } + triggers { + parameterizedCron ''' + H 15 * * * %TEST_MANIFEST=2.7.0/opensearch-2.7.0-test.yml;BUILD_MANIFEST_URL=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/latest/linux/arm64/tar/builds/opensearch/manifest.yml + H 15 * * * %TEST_MANIFEST=2.7.0/opensearch-2.7.0-test.yml;BUILD_MANIFEST_URL=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/latest/linux/x64/tar/builds/opensearch/manifest.yml + ''' + } parameters { string( name: 'COMPONENT_NAME', diff --git a/tests/jenkins/TestOpenSearchIntegTest.groovy b/tests/jenkins/TestOpenSearchIntegTest.groovy index 4c61460510..e593ea1cf3 100644 --- a/tests/jenkins/TestOpenSearchIntegTest.groovy +++ b/tests/jenkins/TestOpenSearchIntegTest.groovy @@ -68,6 +68,7 @@ class TestOpenSearchIntegTest extends BuildPipelineTest { return helper.callClosure(closure) }) helper.registerAllowedMethod("withCredentials", [Map]) + helper.registerAllowedMethod('parameterizedCron', [String], null) helper.registerAllowedMethod('readYaml', [Map.class], { args -> return new Yaml().load((this.testManifest ?: binding.getVariable('TEST_MANIFEST') as File).text) }) 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 c732ab4248..c475ab1812 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/integ-test.jenkinsfile.txt @@ -5,6 +5,10 @@ integ-test.credentials(jenkins-artifact-bucket-name) integ-test.timeout({time=3, unit=HOURS}) integ-test.echo(Executing on agent [label:none]) + integ-test.parameterizedCron( + H 15 * * * %TEST_MANIFEST=2.7.0/opensearch-2.7.0-test.yml;BUILD_MANIFEST_URL=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/latest/linux/arm64/tar/builds/opensearch/manifest.yml + H 15 * * * %TEST_MANIFEST=2.7.0/opensearch-2.7.0-test.yml;BUILD_MANIFEST_URL=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/latest/linux/x64/tar/builds/opensearch/manifest.yml + ) integ-test.stage(verify-parameters, groovy.lang.Closure) integ-test.echo(Executing on agent [label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host]) integ-test.script(groovy.lang.Closure)