Merge "Re-add All view tab after deleting all jobs&views"
authorAnil Belur <abelur@linuxfoundation.org>
Mon, 19 Nov 2018 10:14:59 +0000 (10:14 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Mon, 19 Nov 2018 10:14:59 +0000 (10:14 +0000)
jjb/lf-ci-jobs.yaml
releasenotes/notes/jenkins-sandbox-cleanup-all-view-1e008fa0b38792a5.yaml [new file with mode: 0644]
shell/jenkins-sandbox-cleanup.sh
tox.ini

index 620783f..5fe95a6 100644 (file)
     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
diff --git a/releasenotes/notes/jenkins-sandbox-cleanup-all-view-1e008fa0b38792a5.yaml b/releasenotes/notes/jenkins-sandbox-cleanup-all-view-1e008fa0b38792a5.yaml
new file mode 100644 (file)
index 0000000..1ebb0df
--- /dev/null
@@ -0,0 +1,14 @@
+---
+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.
index c196973..e97dbe4 100644 (file)
@@ -14,3 +14,11 @@ echo "---> jenkins-sandbox-cleanup.sh"
 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
diff --git a/tox.ini b/tox.ini
index 58a8600..aa59147 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -36,7 +36,7 @@ commands =
 
 [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
 
@@ -65,7 +65,7 @@ commands = lftools license check-dir -r '.+' shell
 
 [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}