From 3ce7fc00b7bf2b3fdaccb5d1ccadff01c7118c29 Mon Sep 17 00:00:00 2001 From: Divya Madala Date: Thu, 19 Sep 2024 11:16:39 -0700 Subject: [PATCH] Move the rpm-validation job to leagcy dir Signed-off-by: Divya Madala --- jenkins/legacy/rpm-validation.jenkinsfile | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 jenkins/legacy/rpm-validation.jenkinsfile diff --git a/jenkins/legacy/rpm-validation.jenkinsfile b/jenkins/legacy/rpm-validation.jenkinsfile new file mode 100644 index 0000000000..6f4d35db70 --- /dev/null +++ b/jenkins/legacy/rpm-validation.jenkinsfile @@ -0,0 +1,69 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +lib = library(identifier: 'jenkins@4.0.0', retriever: modernSCM([ + $class: 'GitSCMSource', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', +])) + +pipeline { + agent none + options { + timeout(time: 30, unit: 'MINUTES') + } + parameters { + string( + name: 'BUNDLE_MANIFEST_URL', + description: 'The bundle manifest url, required for yum staging repo file. (e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.0.0-rc1/2493/linux/x64/rpm/dist/opensearch/manifest.yml)', + trim: true + ) + string( + name: 'AGENT_LABEL', + description: 'The agent label where the tests should be executed, e.g. Jenkins-Agent-AL2023-X64-C54xlarge-Docker-Host or Jenkins-Agent-AL2023-Arm64-C6g4xlarge-Docker-Host', + trim: true + ) + + } + + stages { + stage('RPM distribution validation starts:') { + agent { + docker { + label AGENT_LABEL + image 'opensearchstaging/ci-runner:ci-runner-almalinux8-systemd-base-integtest-v1' + args '--entrypoint=/usr/lib/systemd/systemd -u root --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host' + registryUrl 'https://public.ecr.aws/' + alwaysPull true + } + } + steps { + script { + currentBuild.description = BUNDLE_MANIFEST_URL + rpmDistValidation( + bundleManifestURL: "$BUNDLE_MANIFEST_URL" + ) + } + } + post { + always { + sh "rm -rf $WORKSPACE/*" + postCleanup() + } + } + } + } + post() { + success { + echo "Validation for the RPM distribution has been completed successfully." + } + failure { + echo "Validation for RPM distribution failed." + } + } +}