From 92f029025a735aa8e7c39b89f0d051da0bf821aa Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Wed, 4 Sep 2024 13:00:55 -0400 Subject: [PATCH] allow to filter CVEs by a component name 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 0aaa890d..9abbc3c7 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('COMPONENT_NAME', '', 'Filter product Jiras result by a component') stringParam('ADDITIONAL_JIRAS', '', 'Comma separated list of extra Jiras not part of current product name/version') } 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 266c58a4..8f518da5 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-rhel8-pipeline && !built-in') { stage('Print variables') { println "[INFO] PRODUCT_NAME: ${PRODUCT_NAME}" println "[INFO] PRODUCT_VERSION: ${PRODUCT_VERSION}" + println "[INFO] COMPONENT_NAME: ${COMPONENT_NAME}" println "[INFO] ADDITIONAL_JIRAS: ${ADDITIONAL_JIRAS}" println "[INFO] JIRA_SEARCH_URL: ${JIRA_SEARCH_URL}" println "[INFO] BUGZILLA_URL: ${BUGZILLA_URL}" @@ -12,7 +13,7 @@ node('kie-rhel8-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, ADDITIONAL_JIRAS) + def inputStream = jira.getCVEsFromRelease(PRODUCT_NAME, PRODUCT_VERSION, JIRA_SEARCH_URL, JIRA_TOKEN, COMPONENT_NAME, 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.'