From bac4db0546cef65d36b5f7d4447a970081152aa1 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 24 Aug 2023 10:38:32 +1000 Subject: [PATCH] Feat: Upgrade Jenkins-job-builder to 5.0.4 Supports urllib3 to newer DEFAULT_TIMEOUT, therefore unpin urllib3<2.0.0 Ref: https://review.opendev.org/c/jjb/python-jenkins/+/882757 Fixes Jenkins version 2.387.1 or earlier can return 'all' as view name when requested is 'All'. Issue: RELENG-4853 Change-Id: Idcfae769f5e5c4268380f531ad86e57aab4fbf03 Signed-off-by: Anil Belur --- jjb/lf-ci-jobs.yaml | 2 +- .../notes/upgrade-jjb-504-unpin-urllib3-4a02cb1c6d7f58fc.yaml | 11 +++++++++++ requirements.txt | 2 +- shell/jenkins-sandbox-cleanup.sh | 2 +- shell/jjb-deploy-job.sh | 2 +- shell/jjb-merge-job.sh | 2 +- shell/jjb-verify-job.sh | 2 +- tox.ini | 4 ++-- 8 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/upgrade-jjb-504-unpin-urllib3-4a02cb1c6d7f58fc.yaml diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index b61009aa..1c91b01b 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -101,7 +101,7 @@ disable-job: false github-url: "https://github.com" jjb-cache: "$HOME/.cache/jenkins_jobs" - jjb-version: 5.0.2 + jjb-version: 5.0.4 stream: master submodule-recursive: true submodule-timeout: 10 diff --git a/releasenotes/notes/upgrade-jjb-504-unpin-urllib3-4a02cb1c6d7f58fc.yaml b/releasenotes/notes/upgrade-jjb-504-unpin-urllib3-4a02cb1c6d7f58fc.yaml new file mode 100644 index 00000000..17724633 --- /dev/null +++ b/releasenotes/notes/upgrade-jjb-504-unpin-urllib3-4a02cb1c6d7f58fc.yaml @@ -0,0 +1,11 @@ +--- +issues: + - | + Supports urllib3 to newer DEFAULT_TIMEOUT, therefore unpin urllib3<2.0.0 + Ref: https://review.opendev.org/c/jjb/python-jenkins/+/882757 + + Fixes Jenkins version 2.387.1 or earlier can return 'all' as view name when + requested is 'All'. +upgrade: + - | + Upgrade Jenkins-job-builder to 5.0.4 diff --git a/requirements.txt b/requirements.txt index e4229493..38793397 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ reno~=2.11.2 Sphinx~=4.2.0 sphinx_bootstrap_theme sphinxcontrib-programoutput -urllib3~=1.26.15 +urllib3 yq diff --git a/shell/jenkins-sandbox-cleanup.sh b/shell/jenkins-sandbox-cleanup.sh index 919bd733..dc69e2b7 100644 --- a/shell/jenkins-sandbox-cleanup.sh +++ b/shell/jenkins-sandbox-cleanup.sh @@ -17,7 +17,7 @@ set -euf -o pipefail . ~/lf-env.sh lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv \ - jenkins-job-builder urllib3~=1.26.15 + jenkins-job-builder # jenkins-jobs does not always open 'stdin' which may cause 'yes' to fail (yes || true) | jenkins-jobs -s sandbox delete-all diff --git a/shell/jjb-deploy-job.sh b/shell/jjb-deploy-job.sh index 3daa5739..08e64aa5 100644 --- a/shell/jjb-deploy-job.sh +++ b/shell/jjb-deploy-job.sh @@ -20,7 +20,7 @@ set -uef -o pipefail source ~/lf-env.sh # Version controlled by JJB_VERSION -lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv jenkins-job-builder urllib3~=1.26.15 +lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv jenkins-job-builder # Fetch patch if gerrit project matches the jjb-deploy project if [ "${GERRIT_PROJECT}" == "${PROJECT}" ]; then diff --git a/shell/jjb-merge-job.sh b/shell/jjb-merge-job.sh index 5f4c564d..3b34fa81 100644 --- a/shell/jjb-merge-job.sh +++ b/shell/jjb-merge-job.sh @@ -18,6 +18,6 @@ set -eu -o pipefail # shellcheck disable=SC1090 source ~/lf-env.sh -lf-activate-venv jenkins-job-builder setuptools==65.7.0 urllib3~=1.26.15 +lf-activate-venv jenkins-job-builder setuptools==65.7.0 jenkins-jobs update --recursive --delete-old --workers "$workers" jjb/ diff --git a/shell/jjb-verify-job.sh b/shell/jjb-verify-job.sh index 0424f743..abfda1cd 100644 --- a/shell/jjb-verify-job.sh +++ b/shell/jjb-verify-job.sh @@ -19,7 +19,7 @@ lf-git-validate-jira-urls lf-jjb-check-ascii lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv \ - jenkins-job-builder setuptools==65.7.0 urllib3~=1.26.15 + jenkins-job-builder setuptools==65.7.0 jenkins-jobs test --recursive -o archives/job-configs --config-xml jjb/ diff --git a/tox.ini b/tox.ini index 2fb00fa4..bd167508 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ commands = [testenv:jjb] basepython = python3 deps = - jenkins-job-builder==5.0.2 + jenkins-job-builder==5.0.4 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:5.0.2} + jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:5.0.4} commands = jenkins-jobs {posargs:--help} -- 2.16.6