From 69f929e4d0969c3019c1b128efb9f90fccf472a7 Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Wed, 5 Jun 2024 14:27:06 +0200 Subject: [PATCH] allow to add extra CVE Jiras not part of current product/version in rhsa-errata-content job --- job-dsls/jobs/prod/prod_rhsa_errata_content.groovy | 1 + .../resources/job-scripts/prod_rhsa_errata_content.jenkinsfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/job-dsls/jobs/prod/prod_rhsa_errata_content.groovy b/job-dsls/jobs/prod/prod_rhsa_errata_content.groovy index ac7a1aa46..0aaa890d0 100644 --- a/job-dsls/jobs/prod/prod_rhsa_errata_content.groovy +++ b/job-dsls/jobs/prod/prod_rhsa_errata_content.groovy @@ -13,6 +13,7 @@ pipelineJob("${folderPath}/rhsa-errata-content") { parameters { stringParam('PRODUCT_NAME', 'RHPAM', 'Product name') stringParam('PRODUCT_VERSION', '7.12.0.GA', 'Product target version') + stringParam('ADDITIONAL_JIRAS', '', 'Comma separated list of extra Jiras not part of current product name/version') } logRotator { diff --git a/job-dsls/src/main/resources/job-scripts/prod_rhsa_errata_content.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_rhsa_errata_content.jenkinsfile index fa3bffa77..b152c9292 100644 --- a/job-dsls/src/main/resources/job-scripts/prod_rhsa_errata_content.jenkinsfile +++ b/job-dsls/src/main/resources/job-scripts/prod_rhsa_errata_content.jenkinsfile @@ -4,6 +4,7 @@ node('kie-rhel7-pipeline && !built-in') { stage('Print variables') { println "[INFO] PRODUCT_NAME: ${PRODUCT_NAME}" println "[INFO] PRODUCT_VERSION: ${PRODUCT_VERSION}" + println "[INFO] ADDITIONAL_JIRAS: ${ADDITIONAL_JIRAS}" println "[INFO] JIRA_SEARCH_URL: ${JIRA_SEARCH_URL}" println "[INFO] BUGZILLA_URL: ${BUGZILLA_URL}" println "[INFO] CVE_CLASSIFICATION_URL: ${CVE_CLASSIFICATION_URL}" @@ -11,7 +12,7 @@ node('kie-rhel7-pipeline && !built-in') { stage('Print RHSA Errata content') { withCredentials([string(credentialsId: 'jira-token', variable: 'JIRA_TOKEN')]) { - def inputStream = jira.getCVEsFromRelease(PRODUCT_NAME, PRODUCT_VERSION, JIRA_SEARCH_URL, JIRA_TOKEN) + def inputStream = jira.getCVEsFromRelease(PRODUCT_NAME, PRODUCT_VERSION, JIRA_SEARCH_URL, JIRA_TOKEN, ADDITIONAL_JIRAS) def cveList = rhsaErrata.getCVEList(inputStream.text, BUGZILLA_URL) if (cveList.isEmpty()) { println 'No security Jira was found for the given product and version.'