From cbe4988f0e9e9668919c0dd5cdd03d1e925ce93f Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 28 Feb 2024 09:01:26 +1000 Subject: [PATCH] Feat!: Upgrade Jenkins-job-builder to 6x Jenkins Job Builder 6.0.0 is released and breaks backward compatibility with 5.1.0. The breaking changes with previous 5.1.0 release: - Jobs are now expanded the same way as job templates. - Macros without parameters are now expanded the same way as macros with parameters. - Tags !include-raw: and !include-raw-escape: should now be used the same way in jobs and macros without parameters as they are used in job templates and macros with parameters. Note: This breaks backward compatibility with older version of JJB therefore care must be taken when upgrading the ci-man repositories. Ref: https://storyboard.openstack.org/#!/story/2010963 https://storyboard.openstack.org/#!/story/2010588 Issue: LF-JIRA RELENG-5182 Change-Id: Ib9acd0b9e7c264ac3531af858431e738397833b5 Signed-off-by: Anil Belur --- extras/bash/sandbox_test_functions.sh | 2 +- global-jjb | 2 +- jjb/ci-management/ci-management-jobs.yaml | 2 +- jjb/csit/csit-perf.yaml | 27 +++++++++++++++-------- jjb/csit/csit-tox.yaml | 3 ++- jjb/csit/csit-vpp-device.yaml | 6 +++-- jjb/global-macros.yaml | 18 +++++++-------- 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/extras/bash/sandbox_test_functions.sh b/extras/bash/sandbox_test_functions.sh index c4145675c..a08e5947d 100644 --- a/extras/bash/sandbox_test_functions.sh +++ b/extras/bash/sandbox_test_functions.sh @@ -29,7 +29,7 @@ jjb-sandbox-env() { - local jjb_version=${JJB_VERSION:-"5.0.2"} + local jjb_version=${JJB_VERSION:-"6.0.0"} if [ -z "$WS_ROOT" ] ; then echo "ERROR: WS_ROOT is not set!" diff --git a/global-jjb b/global-jjb index 766dbef8a..b9d610a9e 160000 --- a/global-jjb +++ b/global-jjb @@ -1 +1 @@ -Subproject commit 766dbef8a63d824d6e551d4f179806521be95d13 +Subproject commit b9d610a9e522d71a89d2daeb6f71b2bc2a71cdf7 diff --git a/jjb/ci-management/ci-management-jobs.yaml b/jjb/ci-management/ci-management-jobs.yaml index 58f4d4cf6..3380eda7b 100644 --- a/jjb/ci-management/ci-management-jobs.yaml +++ b/jjb/ci-management/ci-management-jobs.yaml @@ -14,7 +14,7 @@ project-name: ci-management build-node: centos8-builder-2c-2g build-timeout: 15 - jjb-version: 5.0.2 + jjb-version: 6.0.0 - project: name: ci-management diff --git a/jjb/csit/csit-perf.yaml b/jjb/csit/csit-perf.yaml index 78dd9fd86..76c509079 100644 --- a/jjb/csit/csit-perf.yaml +++ b/jjb/csit/csit-perf.yaml @@ -595,7 +595,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -979,7 +980,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1067,7 +1069,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1213,7 +1216,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1298,7 +1302,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1383,7 +1388,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1468,7 +1474,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1553,7 +1560,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: @@ -1638,7 +1646,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-perf-trial-duration-parameter: diff --git a/jjb/csit/csit-tox.yaml b/jjb/csit/csit-tox.yaml index bfb394f65..0e9d7ffc2 100644 --- a/jjb/csit/csit-tox.yaml +++ b/jjb/csit/csit-tox.yaml @@ -45,7 +45,8 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' scm: - gerrit-trigger-scm: diff --git a/jjb/csit/csit-vpp-device.yaml b/jjb/csit/csit-vpp-device.yaml index f2a05420c..dbf3ef931 100644 --- a/jjb/csit/csit-vpp-device.yaml +++ b/jjb/csit/csit-vpp-device.yaml @@ -67,7 +67,8 @@ make-parallel-jobs: '{make-parallel-jobs}' - os-parameter: os: '{os}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter - csit-fail-on-crc-mismatch-parameter: @@ -122,7 +123,8 @@ make-parallel-jobs: '{make-parallel-jobs}' - os-parameter: os: '{os}' - - gerrit-refspec-parameter + - gerrit-refspec-parameter: + refspec: '$GERRIT_REFSPEC' - gerrit-event-type-parameter - gerrit-event-comment-text-parameter # This is an automatic verify job, part of API coverage. diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 25d2785ca..2de57c726 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -872,8 +872,8 @@ - SUCCESS - UNSTABLE build-steps: - - shell: !include-raw: scripts/post_build_executor_info.sh - - shell: !include-raw: scripts/post_build_deploy_archives.sh + - shell: !include-raw-escape: scripts/post_build_executor_info.sh + - shell: !include-raw-escape: scripts/post_build_deploy_archives.sh - fdio-infra-ship-logs mark-unstable-if-failed: true - workspace-cleanup: @@ -931,9 +931,9 @@ files: - file-id: "jenkins-s3-docs-ship" target: $HOME/.aws/credentials - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/terraform_s3_docs_ship.sh - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/publish_docs.sh - shell: !include-raw: - ../global-jjb/shell/logs-clear-credentials.sh @@ -945,9 +945,9 @@ files: - file-id: "jenkins-s3-vpp-docs-ship" target: $HOME/.aws/credentials - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/terraform_s3_docs_ship.sh - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/publish_cov.sh - shell: !include-raw: - ../global-jjb/shell/logs-clear-credentials.sh @@ -959,9 +959,9 @@ files: - file-id: "jenkins-s3-vpp-docs-ship" target: $HOME/.aws/credentials - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/terraform_s3_docs_ship.sh - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/publish_docs.sh - shell: !include-raw: - ../global-jjb/shell/logs-clear-credentials.sh @@ -973,7 +973,7 @@ files: - file-id: "jenkins-s3-log-ship" target: $HOME/.aws/credentials - - shell: !include-raw: + - shell: !include-raw-escape: - scripts/publish_library_py.sh - shell: !include-raw: - scripts/publish_logs.sh