Skip to content

Commit

Permalink
allow to filter CVEs by a component name in rhsa-errata-content job (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rgdoliveira authored Sep 5, 2024
1 parent a96c585 commit 14b7fda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions job-dsls/jobs/prod/prod_rhsa_errata_content.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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.'
Expand Down

0 comments on commit 14b7fda

Please sign in to comment.