From 20762ac6f51ffe83e0c4ba53f7542e0e56619084 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 13 Apr 2023 13:20:36 +1000 Subject: [PATCH] Refactor!: JJB code to comply with v5.x There has been an update to the YAML parser with more fine-tuned control over YAML parsing. YAML objects and parameter expansion logic is in accordance with the latest YAML specification 1.2.2 (released in Oct 2021). Notable changes include: - Aggressive parameter expansion. This may lead to parameters expanded in places where they were not expanded before. - Recursive parameters usage is being treated as error. - Strict checking for missing parameters. - Files included using '!include-raw:' elements and having formatting it path ('lazy-loaded' in previous implementation) are now expanded too. Use '!include-raw-escape:' for them instead. NOTE: this is a beaking change would have potential impact many of jobs in global-jjb and in ci-man repo that DO NOT use global-jjb templates. Issue: RELENG-4686 Change-Id: Ie7417956bdcf5f4d6477dbff87baca6b1b8aeeaf Ref: https://groups.google.com/u/2/g/jenkins-job-builder/c/1fx7PmADgXw Signed-off-by: Anil Belur --- .jjb-test/lf-c-cpp-jobs.yaml | 2 + .jjb-test/lf-ci-jobs.yaml | 5 +++ .../openstack-update-cloud-image-full.yaml | 2 +- .jjb-test/lf-go-jobs/go-jobs.yaml | 1 + .jjb-test/lf-maven-jobs.yaml | 1 + .jjb-test/lf-maven-jobs/lf-maven-docker-jobs.yaml | 1 + .jjb-test/lf-node-jobs.yaml | 1 + .jjb-test/lf-python-jobs.yaml | 2 + .jjb-test/lf-release-jobs.yaml | 1 + .jjb-test/lf-rtd-jobs.yaml | 1 + jjb/lf-c-cpp-jobs.yaml | 20 ++++----- jjb/lf-ci-jobs.yaml | 52 +++++++++++----------- jjb/lf-docker-jobs.yaml | 10 ++--- jjb/lf-go-jobs.yaml | 6 +-- jjb/lf-info-vote.yaml | 4 +- jjb/lf-maven-jobs.yaml | 30 ++++++------- jjb/lf-node-jobs.yaml | 2 +- jjb/lf-pipeline-jobs.yaml | 4 +- jjb/lf-python-jobs.yaml | 22 ++++----- jjb/lf-release-jobs.yaml | 14 +++--- jjb/lf-release-management-jobs.yaml | 2 +- jjb/lf-rtd-jobs.yaml | 7 ++- jjb/lf-rtdv3-jobs.yaml | 2 +- jjb/lf-views.yaml | 2 +- jjb/lf-whitesource-jobs.yaml | 4 +- .../notes/upgrade-jjb-to-5x-908aaa15a97d8c2b.yaml | 13 ++++++ tox.ini | 8 ++-- 27 files changed, 123 insertions(+), 96 deletions(-) create mode 100644 releasenotes/notes/upgrade-jjb-to-5x-908aaa15a97d8c2b.yaml diff --git a/.jjb-test/lf-c-cpp-jobs.yaml b/.jjb-test/lf-c-cpp-jobs.yaml index f3d4f495..d0c2c13e 100644 --- a/.jjb-test/lf-c-cpp-jobs.yaml +++ b/.jjb-test/lf-c-cpp-jobs.yaml @@ -23,6 +23,7 @@ project-name: github-autotools mvn-settings: github-autotools-project-settings debian-distribution-versions: ubuntu/bionic + github-org: fake-org packagecloud-account: example packagecloud-repo: master rpm-distribution-versions: el/5 @@ -59,6 +60,7 @@ - github-cmake-verify project-name: github-cmake + github-org: fake-org javadoc-path: org.example.project/$STREAM staging-profile-id: uuddlrlrba mvn-settings: github-cmake-project-settings diff --git a/.jjb-test/lf-ci-jobs.yaml b/.jjb-test/lf-ci-jobs.yaml index f7eed0d0..f66be151 100644 --- a/.jjb-test/lf-ci-jobs.yaml +++ b/.jjb-test/lf-ci-jobs.yaml @@ -12,6 +12,7 @@ - "{project-name}-github-ci-jobs" project-name: github-ciman + github-org: fake-org - project: name: gerrit-openstack-jobs @@ -30,6 +31,7 @@ - github-openstack-cron project-name: github-ciman + github-org: fake-org jenkins-urls: > https://jenkins.example.org @@ -57,6 +59,7 @@ packer-cloud-settings: ci-packer-cloud-env project-name: github-ciman + github-org: fake-org platforms: - centos - ubuntu1604 @@ -112,3 +115,5 @@ - github-sonar-prescan - github-sonar-prescan-script: sonar-prescan-script: "#!/bin/sh" + + github-org: fake-org diff --git a/.jjb-test/lf-ci-jobs/openstack-update-cloud-image-full.yaml b/.jjb-test/lf-ci-jobs/openstack-update-cloud-image-full.yaml index fd6eee8a..5ad99a73 100644 --- a/.jjb-test/lf-ci-jobs/openstack-update-cloud-image-full.yaml +++ b/.jjb-test/lf-ci-jobs/openstack-update-cloud-image-full.yaml @@ -9,7 +9,7 @@ build-timeout: 10 branch: master archive-artifacts: "**/*.log" - jenkins-ssh-credential: "{jenkins-ssh-credential}" + jenkins-ssh-credential: "jenkins-ssh-credential" gerrit-user: "jenkins-user" gerrit-host: "git.example.org" gerrit-topic: "update-cloud-image" diff --git a/.jjb-test/lf-go-jobs/go-jobs.yaml b/.jjb-test/lf-go-jobs/go-jobs.yaml index 69dde4cc..b4b65220 100644 --- a/.jjb-test/lf-go-jobs/go-jobs.yaml +++ b/.jjb-test/lf-go-jobs/go-jobs.yaml @@ -17,6 +17,7 @@ - "github-go-verify" project: go/project + github-org: fake-org project-name: github-go-project go-root: go branch: master diff --git a/.jjb-test/lf-maven-jobs.yaml b/.jjb-test/lf-maven-jobs.yaml index 970e383e..8100c0fb 100644 --- a/.jjb-test/lf-maven-jobs.yaml +++ b/.jjb-test/lf-maven-jobs.yaml @@ -33,6 +33,7 @@ - github-maven-verify project-name: github-maven + github-org: fake-org javadoc-path: org.example.project/$STREAM staging-profile-id: uuddlrlrba mvn-settings: aproject-settings diff --git a/.jjb-test/lf-maven-jobs/lf-maven-docker-jobs.yaml b/.jjb-test/lf-maven-jobs/lf-maven-docker-jobs.yaml index f0f4a2e0..7232e691 100644 --- a/.jjb-test/lf-maven-jobs/lf-maven-docker-jobs.yaml +++ b/.jjb-test/lf-maven-jobs/lf-maven-docker-jobs.yaml @@ -24,6 +24,7 @@ - github-maven-docker-verify project-name: github-maven-docker + github-org: fake-org container-public-registry: pub-registry container-snapshot-registry: snap-registry container-staging-registry: stage-registry diff --git a/.jjb-test/lf-node-jobs.yaml b/.jjb-test/lf-node-jobs.yaml index 274a7f04..89c6f1d6 100644 --- a/.jjb-test/lf-node-jobs.yaml +++ b/.jjb-test/lf-node-jobs.yaml @@ -11,6 +11,7 @@ jobs: - "{project-name}-github-node-jobs" + github-org: fake-org project-name: github-node - project: diff --git a/.jjb-test/lf-python-jobs.yaml b/.jjb-test/lf-python-jobs.yaml index 8d274290..e325ba93 100644 --- a/.jjb-test/lf-python-jobs.yaml +++ b/.jjb-test/lf-python-jobs.yaml @@ -32,6 +32,8 @@ - github-tox-sonarqube project-name: github-python + github-org: fake-org + mvn-settings: fake-mvn-settings - project: name: python-jobs-view diff --git a/.jjb-test/lf-release-jobs.yaml b/.jjb-test/lf-release-jobs.yaml index 2a53f869..360c34df 100644 --- a/.jjb-test/lf-release-jobs.yaml +++ b/.jjb-test/lf-release-jobs.yaml @@ -17,4 +17,5 @@ project: self-release/project-github project-name: self-release-project-github branch: master + github-org: fake-org mvn-settings: github-maven-project-settings diff --git a/.jjb-test/lf-rtd-jobs.yaml b/.jjb-test/lf-rtd-jobs.yaml index a530d4a8..0899d07e 100644 --- a/.jjb-test/lf-rtd-jobs.yaml +++ b/.jjb-test/lf-rtd-jobs.yaml @@ -16,6 +16,7 @@ - github-rtd-verify project-name: github-rtd + github-org: fake-org rtd-build-url: fake-rtd-build-url rtd-token: fake-rtd-token diff --git a/jjb/lf-c-cpp-jobs.yaml b/jjb/lf-c-cpp-jobs.yaml index 1b448de9..14bb46e9 100644 --- a/jjb/lf-c-cpp-jobs.yaml +++ b/jjb/lf-c-cpp-jobs.yaml @@ -3,7 +3,7 @@ # AUTOTOOLS COMMON # #################### -- lf_autotools_common: &lf_autotools_common +- _lf_autotools_common: &lf_autotools_common name: lf-autotools-common ##################### @@ -40,7 +40,7 @@ # AUTOTOOLS PACKAGECLOUD STAGE # ################################ -- lf_autotools_packagecloud_stage: &lf_autotools_packagecloud_stage +- _lf_autotools_packagecloud_stage: &lf_autotools_packagecloud_stage name: lf-autotools-packagecloud-stage ###################### @@ -182,7 +182,7 @@ # AUTOTOOLS SONARQUBE # ####################### -- lf_autotools_sonarqube: &lf_autotools_sonarqube +- _lf_autotools_sonarqube: &lf_autotools_sonarqube name: lf-autotools-sonarqube ###################### @@ -304,7 +304,7 @@ # AUTOTOOLS VERIFY # #################### -- lf_autotools_verify: &lf_autotools_verify +- _lf_autotools_verify: &lf_autotools_verify name: lf-autotools-verify ###################### @@ -432,7 +432,7 @@ # CMAKE COMMON # ################ -- lf_cmake_common: &lf_cmake_common +- _lf_cmake_common: &lf_cmake_common name: lf-cmake-common ##################### @@ -470,7 +470,7 @@ # CMAKE SONAR # ############### -- lf_cmake_sonar: &lf_cmake_sonar +- _lf_cmake_sonar: &lf_cmake_sonar name: lf-cmake-sonar ###################### @@ -580,7 +580,7 @@ # CMAKE SONARQUBE # ################### -- lf_cmake_sonarqube: &lf_cmake_sonarqube +- _lf_cmake_sonarqube: &lf_cmake_sonarqube name: lf-cmake-sonarqube ###################### @@ -710,7 +710,7 @@ # CMAKE STAGE # ############### -- lf_cmake_stage: &lf_cmake_stage +- _lf_cmake_stage: &lf_cmake_stage name: lf-cmake-stage ###################### @@ -867,7 +867,7 @@ # CMAKE PACKAGECLOUD STAGE # ############################ -- lf_cmake_pc_stage: &lf_cmake_pc_stage +- _lf_cmake_pc_stage: &lf_cmake_pc_stage name: lf-cmake-packagecloud-stage ###################### @@ -1009,7 +1009,7 @@ # CMAKE VERIFY # ################ -- lf_cmake_verify: &lf_cmake_verify +- _lf_cmake_verify: &lf_cmake_verify name: lf-cmake-verify ###################### diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 09a76a10..add2505b 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -11,8 +11,8 @@ - file-id: jjbini target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini" -- lf_packer: &lf_packer_common - name: lf-packer-common +- _lf_packer_common: &lf_packer_common + name: lf_packer_common # Provide configuration common in packer jobs. ###################### @@ -89,7 +89,7 @@ default: "{puppet-lint-version}" description: Puppet-lint version to download and install. -- lf_jjb_common: &lf_jjb_common +- _lf_jjb_common: &lf_jjb_common name: lf-jjb-common ###################### @@ -101,7 +101,7 @@ disable-job: false github-url: "https://github.com" jjb-cache: "$HOME/.cache/jenkins_jobs" - jjb-version: 4.1.0 + jjb-version: 5.0.1 stream: master submodule-recursive: true submodule-timeout: 10 @@ -258,7 +258,7 @@ - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini" -- lf_jenkins_configuration: &lf_jenkins_cfg_merge +- _lf_jenkins_configuration: &lf_jenkins_cfg_merge name: lf-jenkins-cfg-merge ###################### @@ -397,7 +397,7 @@ # Jenkins Configuration Management Verify # ########################################### -- lf_jenkins_configuration: &lf_jenkins_cfg_verify +- _lf_jenkins_configuration: &lf_jenkins_cfg_verify name: lf-jenkins-cfg-verify ###################### @@ -534,7 +534,7 @@ # JENKINS SANDBOX CLEANUP # ########################### -- lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup +- _lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup name: lf-jenkins-sandbox-cleanup ###################### @@ -586,7 +586,7 @@ # JJB DEPLOY JOB # ################## -- lf_jjb_deploy_job: &lf_jjb_deploy_job +- _lf_jjb_deploy_job: &lf_jjb_deploy_job name: lf-jjb-deploy-job ###################### @@ -715,7 +715,7 @@ # JJB Merge # ############# -- lf_jjb_merge: &lf_jjb_merge +- _lf_jjb_merge: &lf_jjb_merge name: lf-jjb-merge ###################### @@ -824,7 +824,7 @@ # JJB Verify # ############## -- lf_jjb_verify: &lf_jjb_verify +- _lf_jjb_verify: &lf_jjb_verify name: lf-jjb-verify ###################### @@ -950,7 +950,7 @@ # JJB Verify Upstream GJJB # ############################ -- lf_jjb_verify: &lf_jjb_verify_upstream_gjjb +- _lf_jjb_verify: &lf_jjb_verify_upstream_gjjb name: lf-jjb-verify-upstream-gjjb ##################### @@ -1063,7 +1063,7 @@ # License Check # ################# -- lf_license_check: &lf_license_check +- _lf_license_check: &lf_license_check name: lf-license-check ###################### @@ -1201,7 +1201,7 @@ # Info YAML Verify # #################### -- lf_info_yaml_verify: &lf_info_yaml_verify +- _lf_info_yaml_verify: &lf_info_yaml_verify name: lf-info-yaml-verify ###################### @@ -1301,7 +1301,7 @@ # OPENSTACK CRON # ################## -- lf_openstack_cron: &lf_openstack_cron +- _lf_openstack_cron: &lf_openstack_cron name: lf-openstack-cron ###################### @@ -1458,7 +1458,7 @@ # Packer Merge # ################ -- lf_packer_merge: &lf_packer_merge +- _lf_packer_merge: &lf_packer_merge name: lf-packer-merge ###################### @@ -1763,7 +1763,7 @@ # Packer Verify # ################# -- lf_packer_verify: &lf_packer_verify +- _lf_packer_verify: &lf_packer_verify name: lf-packer-verify ###################### @@ -1888,7 +1888,7 @@ # Openstack Update Cloud Image # ################################ -- lf_openstack_cron: &lf_openstack_update_cloud_image +- _lf_openstack_cron: &lf_openstack_update_cloud_image name: lf-openstack-update-cloud-image ###################### @@ -2005,7 +2005,7 @@ # Puppet Verify # ################# -- lf_puppet_verify: &lf_puppet_verify +- _lf_puppet_verify: &lf_puppet_verify name: lf-puppet-verify ###################### @@ -2153,7 +2153,7 @@ # Sonar # ######### -- lf_sonar_common: &lf_sonar_common +- _lf_sonar_common: &lf_sonar_common name: lf-sonar-common ###################### @@ -2222,7 +2222,7 @@ publishers: - lf-infra-publish -- lf_sonar_builders: &lf_sonar_builders +- _lf_sonar_builders: &lf_sonar_builders name: lf-sonar-builders builders: - lf-infra-pre-build @@ -2235,7 +2235,7 @@ sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" -- lf_sonar_builders_prescan: &lf_sonar_builders_prescan +- _lf_sonar_builders_prescan: &lf_sonar_builders_prescan name: lf-sonar-builders-prescan builders: - lf-infra-pre-build @@ -2248,7 +2248,7 @@ sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" -- lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script +- _lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script name: lf-sonar-builders-prescan-script builders: - lf-infra-pre-build @@ -2262,7 +2262,7 @@ sonar-java-opts: "{sonar-java-opts}" sonar-additional-args: "{sonar-additional-args}" -- lf_sonar_gerrit_common: &lf_sonar_gerrit_common +- _lf_sonar_gerrit_common: &lf_sonar_gerrit_common name: lf-sonar-gerrit-common gerrit_sonar_triggers: - comment-added-contains-event: @@ -2297,7 +2297,7 @@ unstable: true notbuilt: true -- lf_sonar_github_common: &lf_sonar_github_common +- _lf_sonar_github_common: &lf_sonar_github_common name: lf-sonar-github-common properties: - lf-infra-properties: @@ -2385,7 +2385,7 @@ # Pipelines # ############# -- lf_pipelines_common: &lf_pipelines_common +- _lf_pipelines_common: &lf_pipelines_common name: lf-pipelines-common ###################### @@ -2400,7 +2400,7 @@ submodule-timeout: 10 submodule-disable: false -- lf_global_pipelines_common: &lf_global_pipelines_common +- _lf_global_pipelines_common: &lf_global_pipelines_common name: lf-global-pipelines-common # All jobs are triggering from the same source diff --git a/jjb/lf-docker-jobs.yaml b/jjb/lf-docker-jobs.yaml index 7fd937d5..fa19f96e 100644 --- a/jjb/lf-docker-jobs.yaml +++ b/jjb/lf-docker-jobs.yaml @@ -13,7 +13,7 @@ CONTAINER_TAG_METHOD={container-tag-method} CONTAINER_TAG_YAML_DIR={container-tag-yaml-dir} DOCKER_ROOT={docker-root} - - shell: !include-raw: "{docker-get-container-tag-script}" + - shell: !include-raw-escape: "{docker-get-container-tag-script}" - inject: # Import the container tag set by this build step properties-file: "env_docker_inject.txt" @@ -44,7 +44,7 @@ # COMMON FUNCTIONS # #################### -- lf_docker_common: &lf_docker_common +- _lf_docker_common: &lf_docker_common name: lf-docker-common project-type: freestyle @@ -96,7 +96,7 @@ publishers: - lf-infra-publish -- docker_verify_common: &docker_verify_common +- _docker_verify_common: &docker_verify_common name: docker-verify-common concurrent: true @@ -149,7 +149,7 @@ - shell: "{post_docker_build_script}" - lf-provide-maven-settings-cleanup -- docker_merge_common: &docker_merge_common +- _docker_merge_common: &docker_merge_common name: docker-merge-common cron: "@weekly" # check dependencies regularly @@ -349,7 +349,7 @@ # Docker Snyk CLI # ################## -- lf_docker_snyk_cli: &lf_docker_snyk_cli +- _lf_docker_snyk_cli: &lf_docker_snyk_cli name: lf-docker-snyk_cli ###################### diff --git a/jjb/lf-go-jobs.yaml b/jjb/lf-go-jobs.yaml index dc1a7086..876cbdfd 100644 --- a/jjb/lf-go-jobs.yaml +++ b/jjb/lf-go-jobs.yaml @@ -13,7 +13,7 @@ # COMMON FUNCTIONS # #################### -- lf_go_common: &lf_go_common +- _lf_go_common: &lf_go_common name: lf-go-common project-type: freestyle @@ -68,7 +68,7 @@ # Go Snyk CLI # ############### -- lf_go_snyk_cli: &lf_go_snyk_cli +- _lf_go_snyk_cli: &lf_go_snyk_cli name: lf-go-snyk_cli ###################### @@ -212,7 +212,7 @@ # Go Verify # ############# -- lf_go_verify: &lf_go_verify +- _lf_go_verify: &lf_go_verify name: lf-go-verify concurrent: true diff --git a/jjb/lf-info-vote.yaml b/jjb/lf-info-vote.yaml index e318b641..c69ea09e 100644 --- a/jjb/lf-info-vote.yaml +++ b/jjb/lf-info-vote.yaml @@ -3,7 +3,7 @@ # COMMON FUNCTIONS # #################### -- lf_info_vote_common: &lf_info_vote_common +- _lf_info_vote_common: &lf_info_vote_common name: lf-info-vote-common gerrit_trigger_file_paths: @@ -36,7 +36,7 @@ publishers: - lf-infra-publish -- lf_info_vote_verify: &lf_info_vote_verify +- _lf_info_vote_verify: &lf_info_vote_verify name: lf-info-vote-verify branch: master diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 99ab3138..abc6d0fd 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -72,7 +72,7 @@ # COMMON FUNCTIONS # #################### -- lf_maven_common: &lf_maven_common +- _lf_maven_common: &lf_maven_common name: lf-maven-common ###################### @@ -127,7 +127,7 @@ # Maven CLM # ############# -- lf_maven_clm: &lf_maven_clm +- _lf_maven_clm: &lf_maven_clm name: lf-maven-clm ###################### @@ -297,7 +297,7 @@ # Maven Snyk CLI # ################## -- lf_maven_snyk_cli: &lf_maven_snyk_cli +- _lf_maven_snyk_cli: &lf_maven_snyk_cli name: lf-maven-snyk_cli ###################### @@ -463,7 +463,7 @@ # Maven Javadoc Publish # ######################### -- lf_maven_javadoc_publish: &lf_maven_javadoc_publish +- _lf_maven_javadoc_publish: &lf_maven_javadoc_publish name: lf-maven-javadoc-publish ###################### @@ -595,7 +595,7 @@ # Maven Javadoc Verify # ######################## -- lf_maven_javadoc_verify: &lf_maven_javadoc_verify +- _lf_maven_javadoc_verify: &lf_maven_javadoc_verify name: lf-maven-javadoc-verify ###################### @@ -719,7 +719,7 @@ # Maven Merge # ############### -- lf_maven_merge: &lf_maven_merge +- _lf_maven_merge: &lf_maven_merge name: lf-maven-merge ###################### @@ -876,7 +876,7 @@ # Maven Merge for Docker # ########################## -- lf_maven_docker_merge: &lf_maven_docker_merge +- _lf_maven_docker_merge: &lf_maven_docker_merge name: lf-maven-docker-merge builders: @@ -987,7 +987,7 @@ # Maven Stage # ############### -- lf_maven_stage: &lf_maven_stage +- _lf_maven_stage: &lf_maven_stage name: lf-maven-stage ###################### @@ -1185,7 +1185,7 @@ # Maven Stage for Docker # ########################## -- lf_maven_docker_stage: &lf_maven_docker_stage +- _lf_maven_docker_stage: &lf_maven_docker_stage name: lf-maven-docker-stage builders: @@ -1302,7 +1302,7 @@ # Maven Sonar # ############### -- lf_maven_sonar: &lf_maven_sonar +- _lf_maven_sonar: &lf_maven_sonar name: lf-maven-sonar ###################### @@ -1402,7 +1402,7 @@ - findbugs - lf-infra-publish -- mvn_sonar_builders: &mvn_sonar_builders +- _mvn_sonar_builders: &mvn_sonar_builders name: mvn-sonar-builders builders: - lf-infra-pre-build @@ -1436,7 +1436,7 @@ mvn-settings: "{mvn-settings}" mvn-version: "{mvn-version}" -- mvn_sonar_builders_prescan_script: &mvn_sonar_builders_prescan_script +- _mvn_sonar_builders_prescan_script: &mvn_sonar_builders_prescan_script name: mvn-sonar-builders-prescan-script builders: - shell: "{sonar-prescan-script}" @@ -1697,7 +1697,7 @@ # Maven Verify # ################ -- lf_maven_verify: &lf_maven_verify +- _lf_maven_verify: &lf_maven_verify name: lf-maven-verify ###################### @@ -1837,7 +1837,7 @@ # Maven Verify for Docker # ########################### -- lf_maven_docker_verify: &lf_maven_docker_verify +- _lf_maven_docker_verify: &lf_maven_docker_verify name: lf-maven-docker-verify # image push not allowed during verification @@ -1937,7 +1937,7 @@ # Maven Verify Dependencies # ############################# -- lf_maven_verify_dependencies: &lf_maven_verify_dependencies +- _lf_maven_verify_dependencies: &lf_maven_verify_dependencies name: lf-maven-verify-dependencies ###################### diff --git a/jjb/lf-node-jobs.yaml b/jjb/lf-node-jobs.yaml index cfcfd16a..0108d0b6 100644 --- a/jjb/lf-node-jobs.yaml +++ b/jjb/lf-node-jobs.yaml @@ -3,7 +3,7 @@ # Node Verify # ############### -- lf_node_verify: &lf_node_verify +- _lf_node_verify: &lf_node_verify name: lf-node-verify ###################### diff --git a/jjb/lf-pipeline-jobs.yaml b/jjb/lf-pipeline-jobs.yaml index 6f11408d..e8e13d66 100644 --- a/jjb/lf-pipeline-jobs.yaml +++ b/jjb/lf-pipeline-jobs.yaml @@ -3,7 +3,7 @@ # COMMON FUNCTIONS # #################### -- lf_pipeline_common: &lf_pipeline_common +- _lf_pipeline_common: &lf_pipeline_common name: lf-pipeline-common ###################### @@ -48,7 +48,7 @@ # PIPELINE VERIFY# ################## -- lf_pipeline_verify: &lf_pipeline_verify +- _lf_pipeline_verify: &lf_pipeline_verify name: lf-pipeline-verify ###################### diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index bb123f47..0b60e4af 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -30,7 +30,7 @@ # COMMON FUNCTIONS # #################### -- lf_python_common: &lf_python_common +- _lf_python_common: &lf_python_common name: lf-python-common ###################### @@ -69,7 +69,7 @@ # Tox Nexus IQ CLM # #################### -- lf_tox_nexus_iq_clm: &lf_tox_nexus_iq_clm +- _lf_tox_nexus_iq_clm: &lf_tox_nexus_iq_clm name: lf-tox-nexus-iq-clm ###################### @@ -231,7 +231,7 @@ # Python Snyk CLI # ################### -- lf_python_snyk_cli: &lf_python_snyk_cli +- _lf_python_snyk_cli: &lf_python_snyk_cli name: lf-python-snyk_cli ###################### @@ -377,7 +377,7 @@ # Python Sonar with CLI # ######################### -- lf_cli_sonar: &lf_cli_sonar +- _lf_cli_sonar: &lf_cli_sonar name: lf-cli-sonar ###################### @@ -543,7 +543,7 @@ # Python Sonar with Tox # ######################### -- lf_tox_sonar: &lf_tox_sonar +- _lf_tox_sonar: &lf_tox_sonar name: lf-tox-sonar ###################### @@ -562,7 +562,7 @@ mvn-goals: validate mvn-opts: "" mvn-params: "" - mvn-settings: "{mvn-settings}" + mvn-settings: "" mvn-version: mvn35 parallel: true pre-build-script: "# pre-build script goes here" @@ -764,7 +764,7 @@ # Tox SonarQube # ################# -- lf_tox_sonarqube: &lf_tox_sonarqube +- _lf_tox_sonarqube: &lf_tox_sonarqube name: lf-tox-sonarqube ###################### @@ -911,7 +911,7 @@ # Tox Common # ############## -- lf_tox_common: &lf_tox_common +- _lf_tox_common: &lf_tox_common name: lf-tox-common ###################### @@ -1151,7 +1151,7 @@ # PyPI # ######## -- lf_pypi_common: &lf_pypi_common +- _lf_pypi_common: &lf_pypi_common name: lf-pypi-common ###################### @@ -1222,7 +1222,7 @@ publishers: - lf-infra-publish -- lf_pypi_verify_builders: &lf_pypi_verify_builders +- _lf_pypi_verify_builders: &lf_pypi_verify_builders name: lf-pypi-verify-builders builders: @@ -1234,7 +1234,7 @@ parallel: "{parallel}" - shell: !include-raw-escape: ../shell/pypi-dist-build.sh -- lf_pypi_publish_builders: &lf_pypi_publish_builders +- _lf_pypi_publish_builders: &lf_pypi_publish_builders name: lf-pypi-publish-builders builders: diff --git a/jjb/lf-release-jobs.yaml b/jjb/lf-release-jobs.yaml index e1bf0684..7001c9a8 100644 --- a/jjb/lf-release-jobs.yaml +++ b/jjb/lf-release-jobs.yaml @@ -11,7 +11,7 @@ # COMMON FUNCTIONS # #################### -- lf_release_common: &lf_release_common +- _lf_release_common: &lf_release_common name: lf-release-common ##################### @@ -32,7 +32,7 @@ # RELEASE VERIFY # ################## -- lf_release_verify: &lf_release_verify +- _lf_release_verify: &lf_release_verify name: lf-release-verify ###################### @@ -185,7 +185,7 @@ # RELEASE MERGE # ################# -- lf_release_merge: &lf_release_merge +- _lf_release_merge: &lf_release_merge name: lf-release-merge ###################### @@ -338,7 +338,7 @@ # PyPI RELEASE # ################ -- lf_pypi_verify_wrappers: &lf_pypi_verify_wrappers +- _lf_pypi_verify_wrappers: &lf_pypi_verify_wrappers name: lf-pypi-verify-wrappers wrappers: @@ -346,7 +346,7 @@ build-timeout: "{build-timeout}" jenkins-ssh-credential: "{jenkins-ssh-credential}" -- lf_pypi_release_wrappers: &lf_pypi_release_wrappers +- _lf_pypi_release_wrappers: &lf_pypi_release_wrappers name: lf-pypi-release-wrappers wrappers: @@ -354,7 +354,7 @@ build-timeout: "{build-timeout}" jenkins-ssh-credential: "{jenkins-ssh-release-credential}" -- lf_pypi_release: &lf_pypi_release +- _lf_pypi_release: &lf_pypi_release name: lf-pypi-release ###################### @@ -595,7 +595,7 @@ # PackageCloud RELEASE # ######################## -- lf_packagecloud_release_common: &lf_packagecloud_release_common +- _lf_packagecloud_release_common: &lf_packagecloud_release_common name: lf-packagecloud-release-common ###################### diff --git a/jjb/lf-release-management-jobs.yaml b/jjb/lf-release-management-jobs.yaml index 419ffe59..7d409cd5 100644 --- a/jjb/lf-release-management-jobs.yaml +++ b/jjb/lf-release-management-jobs.yaml @@ -3,7 +3,7 @@ # Release Announce # #################### -- lf_release_announce: &lf_release_announce +- _lf_release_announce: &lf_release_announce name: lf-release-announce ###################### diff --git a/jjb/lf-rtd-jobs.yaml b/jjb/lf-rtd-jobs.yaml index 0a757e85..24bef445 100644 --- a/jjb/lf-rtd-jobs.yaml +++ b/jjb/lf-rtd-jobs.yaml @@ -3,13 +3,12 @@ # COMMON FUNCTIONS # #################### -- lf_rtd_common: &lf_rtd_common +- _lf_rtd_common: &lf_rtd_common name: lf-rtd-common ###################### # Default parameters # ###################### - gerrit_trigger_file_paths: - compare-type: REG_EXP pattern: '.*\.css' @@ -57,7 +56,7 @@ # RTD MERGE # ############# -- lf_rtd_merge: &lf_rtd_merge +- _lf_rtd_merge: &lf_rtd_merge name: lf-rtd-merge ###################### @@ -148,7 +147,7 @@ # RTD VERIFY# ############# -- lf_rtd_verify: &lf_rtd_verify +- _lf_rtd_verify: &lf_rtd_verify name: lf-rtd-verify ###################### diff --git a/jjb/lf-rtdv3-jobs.yaml b/jjb/lf-rtdv3-jobs.yaml index 561c7920..dc6becc4 100644 --- a/jjb/lf-rtdv3-jobs.yaml +++ b/jjb/lf-rtdv3-jobs.yaml @@ -1,5 +1,5 @@ --- -- lf_rtdv3_common: &lf_rtdv3_common +- _lf_rtdv3_common: &lf_rtdv3_common name: lf-rtdv3-common ###################### diff --git a/jjb/lf-views.yaml b/jjb/lf-views.yaml index 87784c22..8f980585 100644 --- a/jjb/lf-views.yaml +++ b/jjb/lf-views.yaml @@ -3,7 +3,7 @@ # common view template # ######################## -- lf_view_common_columns: &lf_view_common_columns +- _lf_view_common_columns: &lf_view_common_columns name: lf-view-common-columns columns: diff --git a/jjb/lf-whitesource-jobs.yaml b/jjb/lf-whitesource-jobs.yaml index 6b948616..ed3a5d6b 100644 --- a/jjb/lf-whitesource-jobs.yaml +++ b/jjb/lf-whitesource-jobs.yaml @@ -37,7 +37,7 @@ # COMMON FUNCTIONS # #################### -- lf_whitesource_common: &lf_whitesource_common +- _lf_whitesource_common: &lf_whitesource_common name: lf-whitesource-common ###################### @@ -80,7 +80,7 @@ # WHITESOURCE UNIFIED AGENT SCAN # ################################## -- lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan +- _lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan name: lf-wss-unified-agent-scan ###################### diff --git a/releasenotes/notes/upgrade-jjb-to-5x-908aaa15a97d8c2b.yaml b/releasenotes/notes/upgrade-jjb-to-5x-908aaa15a97d8c2b.yaml new file mode 100644 index 00000000..1a885fb8 --- /dev/null +++ b/releasenotes/notes/upgrade-jjb-to-5x-908aaa15a97d8c2b.yaml @@ -0,0 +1,13 @@ +--- +prelude: > + JJB's YAML parser is re-written in JJB 5.x release for a fine-tuned control + over YAML parsing, YAML objects and parameter expansion logic. +issues: + - | + This breaks backward compatibility with older version of JJB + therefore care must be taken during upgrade. +upgrade: + - | + Upgrade Jenkins-job-builder to 5.0.1 as the default version. + + Ref: https://review.opendev.org/c/jjb/jenkins-job-builder/+/871965 diff --git a/tox.ini b/tox.ini index 03b8bc5b..5b5b138a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,11 +4,11 @@ envlist = ensure-documented, jjb, jjb-compare-xml, -# jjb-latest, + jjb-latest, jjb-version, license, bashate, -# pre-commit + pre-commit skipsdist = True [testenv:docs] @@ -26,7 +26,7 @@ commands = [testenv:jjb] basepython = python3 deps = - jenkins-job-builder==4.1.0 + jenkins-job-builder==5.0.1 commands = jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test @@ -103,7 +103,7 @@ commands = [testenv:jenkins-jobs] deps = - jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:4.1.0} + jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:5.0.1} commands = jenkins-jobs {posargs:--help} -- 2.16.6