From 4d1c6acb545994d3f9b80a887a12ebb0b1fb4833 Mon Sep 17 00:00:00 2001 From: Divya Madala Date: Wed, 18 Sep 2024 17:00:28 -0700 Subject: [PATCH] Cleanup rpm-validation jenkins job Signed-off-by: Divya Madala --- docs/Releasing-the-Distribution.md | 1 - .../distribution-build.jenkinsfile | 32 ++------- .../opensearch/distribution-build.jenkinsfile | 34 ++------- .../rpm-validation/rpm-validation.jenkinsfile | 69 ------------------- 4 files changed, 10 insertions(+), 126 deletions(-) delete mode 100644 jenkins/rpm-validation/rpm-validation.jenkinsfile diff --git a/docs/Releasing-the-Distribution.md b/docs/Releasing-the-Distribution.md index ef1e0b3538..34e2a58cea 100644 --- a/docs/Releasing-the-Distribution.md +++ b/docs/Releasing-the-Distribution.md @@ -67,7 +67,6 @@ These are the issues created by automation with the distribution build and integ | [OpenSearch Dashboards Integ Test](https://build.ci.opensearch.org/job/integ-test-opensearch-dashboards/) | Workflow that runs integ tests for OpenSearch Dashboards and its components. | | [Benchmark Tests](https://build.ci.opensearch.org/job/benchmark-test/) | Workflow that runs Performance tests using [opensearch-benchmark](https://github.com/opensearch-project/opensearch-benchmark) on a cluster created with a given version. | | [BWC Tests](https://build.ci.opensearch.org/job/bwc-test/) | Workflow that runs backward compatibility tests on a cluster created with a given version. | -| [RPM Validation](https://build.ci.opensearch.org/job/rpm-validation/) | Workflow that validates the RPM distribution | | [Docker Build](https://build.ci.opensearch.org/job/docker-build/) | Workflow that builds the OpenSearch and OpenSearch Dashboards docker images | | [Docker Copy](https://build.ci.opensearch.org/job/docker-copy/) | Workflow that copies the created docker images to multiple DockerHub and ECR repositories | | [Docker Scan](https://build.ci.opensearch.org/job/docker-scan/) | Workflow that checks vulnerabilities for a given docker image as an input. | diff --git a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile index 24805541d6..a0dd4c3827 100644 --- a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile +++ b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile @@ -320,14 +320,8 @@ pipeline { echo "artifactUrl (linux, x64, rpm): ${artifactUrl}" String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER) - parallel([ - 'integ-test': { - triggerIntegrationTests(buildManifestUrl, buildManifestUrlOpenSearch, 'linux', 'rpm') - }, - 'rpm-validation': { - triggerRpmValidation(bundleManifestUrl) - } - ]) + + triggerIntegrationTests(buildManifestUrl, buildManifestUrlOpenSearch, 'linux', 'rpm') } } post { @@ -672,14 +666,8 @@ pipeline { echo "artifactUrl (linux, arm64, rpm): ${artifactUrl}" String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER) - parallel([ - 'integ-test': { - triggerIntegrationTests(buildManifestUrl, buildManifestUrlOpenSearch, 'linux', 'rpm') - }, - 'rpm-validation': { - triggerRpmValidation(bundleManifestUrl) - } - ]) + + triggerIntegrationTests(buildManifestUrl, buildManifestUrlOpenSearch, 'linux', 'rpm') } } post { @@ -1064,18 +1052,6 @@ def triggerBWCTests(String buildManifestUrl, String platform, String distributio } } -def triggerRpmValidation(String bundleManifestUrl) { - echo "Triggering RPM validation for ${bundleManifestUrl}" - def rpmValidationResults = - build job: 'rpm-validation', - propagate: false, - wait: false, - parameters: [ - string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl), - string(name: 'AGENT_LABEL', value: AGENT_LINUX_X64) - ] -} - def addMessageToNotificationQueue() { lib.jenkins.Messages.new(this).add("${STAGE_NAME}", lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])) } diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index b33f81397b..67c479759a 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -338,14 +338,8 @@ pipeline { echo "artifactUrl (linux, x64, rpm): ${artifactUrl}" String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER) - parallel([ - 'integ-test': { - triggerIntegrationTests(buildManifestUrl, 'linux', 'rpm') - }, - 'rpm-validation': { - triggerRpmValidation(bundleManifestUrl) - } - ]) + + triggerIntegrationTests(buildManifestUrl, 'linux', 'rpm') } } post { @@ -646,14 +640,10 @@ pipeline { echo "artifactUrl (linux, arm64, rpm): ${artifactUrl}" String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER) - parallel([ - 'integ-test': { - triggerIntegrationTests(buildManifestUrl, 'linux', 'rpm') - }, - 'rpm-validation': { - triggerRpmValidation(bundleManifestUrl) - } - ]) + + triggerIntegrationTests(buildManifestUrl, 'linux', 'rpm') + + } } post { @@ -1036,18 +1026,6 @@ def triggerBWCTests(String buildManifestUrl, String platform, String distributio } } -def triggerRpmValidation(String bundleManifestUrl) { - echo "Triggering RPM validation for ${bundleManifestUrl}" - def rpmValidationResults = - build job: 'rpm-validation', - propagate: false, - wait: false, - parameters: [ - string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl), - string(name: 'AGENT_LABEL', value: AGENT_LINUX_X64) - ] -} - def verifyParameterPlatformDistribution(String paramName, String allowedValue) { echo("Verify Parameter '$paramName'") def paramValue = env."$paramName" diff --git a/jenkins/rpm-validation/rpm-validation.jenkinsfile b/jenkins/rpm-validation/rpm-validation.jenkinsfile deleted file mode 100644 index 6f4d35db70..0000000000 --- a/jenkins/rpm-validation/rpm-validation.jenkinsfile +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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." - } - } -}