Skip to content

Commit 88b16f9

Browse files
authored
Refactor distrubution build job for dashboards (#4373)
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
1 parent bb767ab commit 88b16f9

File tree

1 file changed

+20
-32
lines changed

1 file changed

+20
-32
lines changed

jenkins/opensearch-dashboards/distribution-build.jenkinsfile

+20-32
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@ pipeline {
4444
)
4545
string(
4646
name: 'INTEG_TEST_JOB_NAME',
47-
description: "Name of integration test job that will be triggered, e.g. Playground/integ-test-opensearch-dashboards. A non-null empty value here will skip integration tests.",
48-
defaultValue: "integ-test-opensearch-dashboards",
47+
description: 'Name of integration test job that will be triggered, e.g. Playground/integ-test-opensearch-dashboards. A non-null empty value here will skip integration tests.',
48+
defaultValue: 'integ-test-opensearch-dashboards',
4949
trim: true
5050
)
5151
string(
5252
name: 'BWC_TEST_JOB_NAME',
53-
description: "Name of backwards compatibility test job that will be triggered, e.g. Playground/bwc-test-opensearch-dashboards. A non-null empty value here will skip BWC tests.",
54-
defaultValue: "bwc-test-opensearch-dashboards",
53+
description: 'Name of backwards compatibility test job that will be triggered, e.g. Playground/bwc-test-opensearch-dashboards. A non-null empty value here will skip BWC tests.',
54+
defaultValue: 'bwc-test-opensearch-dashboards',
5555
trim: true
5656
)
5757
string( // Note: need to update 'verify-parameters' entries if you add new platform(s)
5858
name: 'BUILD_PLATFORM',
59-
description: "Build selected platform related artifacts, choices include 'linux windows'. Can combine multiple platforms with space in between (docker is only available on linux)",
59+
description: 'Build selected platform related artifacts, choices include linux windows. Can combine multiple platforms with space in between (docker is only available on linux)',
6060
defaultValue: 'linux windows',
6161
trim: true
6262
)
6363
string( // Note: need to update 'verify-parameters' entries if you add new distribution(s)
6464
name: 'BUILD_DISTRIBUTION',
65-
description: "Build selected distribution related artifacts, choices include 'tar', 'rpm', 'deb', 'zip'. Can combine multiple distributions with space in between (docker is only available on tar)",
65+
description: 'Build selected distribution related artifacts, choices include tar, rpm, deb, zip. Can combine multiple distributions with space in between (docker is only available on tar)',
6666
defaultValue: 'tar rpm deb zip',
6767
trim: true
6868
)
@@ -324,16 +324,7 @@ pipeline {
324324
echo "artifactUrl (linux, x64, rpm): ${artifactUrl}"
325325

326326
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)
327-
328-
echo "Trigger rpm validation for linux x64 rpm ${bundleManifestUrl}"
329-
def rpmValidationResults =
330-
build job: 'rpm-validation',
331-
propagate: false,
332-
wait: false,
333-
parameters: [
334-
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
335-
string(name: 'AGENT_LABEL', value: AGENT_LINUX_X64)
336-
]
327+
triggerRpmValidation(bundleManifestUrl)
337328
}
338329
}
339330
post {
@@ -446,8 +437,6 @@ pipeline {
446437
echo "buildManifestUrl (linux, x64, deb): ${buildManifestUrl}"
447438
echo "artifactUrl (linux, x64, deb): ${artifactUrl}"
448439

449-
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)
450-
451440
}
452441
}
453442
post {
@@ -693,16 +682,7 @@ pipeline {
693682
echo "artifactUrl (linux, arm64, rpm): ${artifactUrl}"
694683

695684
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)
696-
697-
echo "Trigger rpm validation for linux arm64 rpm ${bundleManifestUrl}"
698-
def rpmValidationResults =
699-
build job: 'rpm-validation',
700-
propagate: false,
701-
wait: false,
702-
parameters: [
703-
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
704-
string(name: 'AGENT_LABEL', value: AGENT_LINUX_ARM64)
705-
]
685+
triggerRpmValidation(bundleManifestUrl)
706686
}
707687
}
708688
post {
@@ -814,9 +794,6 @@ pipeline {
814794

815795
echo "buildManifestUrl (linux, arm64, deb): ${buildManifestUrl}"
816796
echo "artifactUrl (linux, arm64, deb): ${artifactUrl}"
817-
818-
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)
819-
820797
}
821798
}
822799
post {
@@ -891,7 +868,6 @@ pipeline {
891868

892869
echo "buildManifestUrl (windows, x64, zip): ${buildManifestUrl}"
893870
echo "artifactUrl (windows, x64, zip): ${artifactUrl}"
894-
895871
}
896872
}
897873
post {
@@ -1087,3 +1063,15 @@ def triggerBWCTests(String buildManifestUrl) {
10871063
]
10881064
}
10891065
}
1066+
1067+
def triggerRpmValidation(String bundleManifestUrl) {
1068+
echo "Triggering RPM validation for ${bundleManifestUrl}"
1069+
def rpmValidationResults =
1070+
build job: 'rpm-validation',
1071+
propagate: false,
1072+
wait: false,
1073+
parameters: [
1074+
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
1075+
string(name: 'AGENT_LABEL', value: AGENT_LINUX_X64)
1076+
]
1077+
}

0 commit comments

Comments
 (0)