This resolves the Jenkins Sandbox being left in a state where a
'00-Empty View' tab is left. This is confusing for Jenkins Sandbox
users as it will look as if the jobs they upload are not being added.
This patch requires JJB 2.8.0 otherwise the jenkins-sandbox-cleanup
job will report failed state. Despite this the primary purpose of the
job (deleting jobs and views) will be successful but needs the new
JJB version to replace the All view automatically.
Issue: RELENG-1450
Change-Id: I4ec106dc55789b7eab717e540491a94e47551852
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
disable-job: false
github-url: 'https://github.com'
jjb-cache: '$HOME/.cache/jenkins_jobs'
- jjb-version: 2.2.1
+ jjb-version: 2.8.0
stream: master
submodule-recursive: true
submodule-timeout: 10
--- /dev/null
+---
+upgrade:
+ - |
+ Requires JJB 2.8.0 for the jenkins-sandbox-cleanup job to not fail.
+
+ .. note::
+
+ Despite the failure if JJB 2.8.0 is not available the job will
+ successfully delete all jobs and views, the primary purpose of this job.
+fixes:
+ - |
+ :ref:`RELENG-1450 <https://jira.linuxfoundation.org/browse/RELENG-1450>`_
+ All view disappears on Jenkins Sandbox after views are deleted. The **All**
+ view is now recreated after ``delete-all`` is run.
set -eux -o pipefail
bash -c "/usr/bin/yes 2>/dev/null || true" | jenkins-jobs -s sandbox delete-all
+
+# Recreate the All default view.
+cat << EOF > all-view.yaml
+- view:
+ name: All
+ view-type: all
+EOF
+jenkins-jobs -s sandbox update -v all-view.yaml
[testenv:jjb]
deps =
- jenkins-job-builder==2.2.1
+ jenkins-job-builder==2.8.0
commands =
jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test
[testenv:jenkins-jobs]
deps =
- jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:2.0.9}
+ jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:2.8.0}
commands =
jenkins-jobs {posargs:--help}