Skip to content

Commit

Permalink
Add TEST_MANIFEST param to check-for-build jenkins job (#1585)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler authored Feb 3, 2022
1 parent 6c54533 commit 484f6bc
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions jenkins/check-for-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ pipeline {
description: 'Input manifest under the manifests folder, e.g. 2.0.0/opensearch-2.0.0.yml.',
trim: true
)
string(
name: 'TEST_MANIFEST',
description: 'Test manifest under the manifests folder, e.g. 2.0.0/opensearch-2.0.0-test.yml. Currently only applicable for distribution-build-opensearch job',
trim: true
)
string(
name: 'TARGET_JOB_NAME',
description: 'Job to trigger if build has changed',
Expand Down Expand Up @@ -66,9 +71,17 @@ pipeline {
echo "Skipping, ${sha.path} already exists."
} else {
try {
build job: "${TARGET_JOB_NAME}", parameters: [
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}")
], wait: true
// Currently only opensearch build takes an additional test manifest parameter
if (TARGET_JOB_NAME == 'distribution-build-opensearch') {
build job: "${TARGET_JOB_NAME}", parameters: [
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}"),
string(name: 'TEST_MANIFEST', value: "${TEST_MANIFEST}")
], wait: true
} else if (TARGET_JOB_NAME == 'distribution-build-opensearch-dashboards') {
build job: "${TARGET_JOB_NAME}", parameters: [
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}")
], wait: true
}
echo "Build succeeded, uploading build SHA for that job"
buildUploadManifestSHA(
inputManifest: "manifests/${INPUT_MANIFEST}",
Expand Down

0 comments on commit 484f6bc

Please sign in to comment.