Skip to content

Commit

Permalink
Add jenkins job
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <[email protected]>
  • Loading branch information
Divyaasm committed Oct 9, 2023
1 parent 6f656a6 commit 217cc09
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions jenkins/validate-artifacts/validate-artifacts.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,37 +96,33 @@ pipeline {
agent { label agent_nodes["x64"] }
steps {
script {
echo "1"
env.url_paths = [:]

OPENSEARCH_ARTIFACT_URL ? url_paths['opensearch'] = OPENSEARCH_ARTIFACT_URL : null
OPENSEARCH_DASHBOARDS_ARTIFACT_URL ? url_paths['opensearch-dashboards'] = OPENSEARCH_DASHBOARDS_ARTIFACT_URL : null

echo "2"

if (OPENSEARCH_DASHBOARDS_ARTIFACT_URL && OPENSEARCH_ARTIFACT_URL == "") {
currentBuild.result = 'ABORTED'
error("Provide OPENSEARCH_ARTIFACT_URL to validate")
}
echo "3"

if (VERSION == '' && url_paths) {
currentBuild.result = 'ABORTED'
error('VERSION cannot be empty. Please provide either version or url paths for the artifacts to validate')
}
echo "4"

if (params.DISTRIBUTION.contains('docker') && (OS_BUILD_NUMBER == '' || OSD_BUILD_NUMBER == '')) {
currentBuild.result = 'ABORTED'
error("Provide OS_BUILD_NUMBER and OSD_BUILD_NUMBER args for Docker Validation")
}
echo "5"
echo "$url_paths"

if(url_paths) {
echo "1"
ARCHITECTURE = url_paths.values().find { it.contains("x64") } ? "x64" : "arm64"
DISTRIBUTION = url_paths.values().find { it.contains("tar.gz") } ? "tar" : (url_paths.values().find { it.contains("rpm") } ? "rpm" : "yum")
}

}
}
post {
Expand Down

0 comments on commit 217cc09

Please sign in to comment.