Add rebase for zuul-jobs & zuul-base-jobs projects

Change-Id: I231ec887f9edfc50c607659ff55ad7d20f2d6a20
diff --git a/playbooks/opendev-zuul-rebase-01.yaml b/playbooks/opendev-zuul-rebase.yaml
similarity index 100%
rename from playbooks/opendev-zuul-rebase-01.yaml
rename to playbooks/opendev-zuul-rebase.yaml
diff --git a/playbooks/roles/zuul-rebase/files/fetch-rebase.sh b/playbooks/roles/zuul-rebase/files/fetch-rebase.sh
index a32db7c..e2c7019 100755
--- a/playbooks/roles/zuul-rebase/files/fetch-rebase.sh
+++ b/playbooks/roles/zuul-rebase/files/fetch-rebase.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-GERRIT_USER="zuul"
-PROJECT="zuul/zuul"
-NORDIX_REMOTE="ssh://${GERRIT_USER}@gerrit.nordix.org:29418/opendev/zuul/zuul.git"
+GERRIT_USER="$1"
+PROJECT="$2"
+NORDIX_REMOTE="$3"
 
 # When the GERRIT_BRANCH is not set the rebase job wasn't triggered by merge
 # but it's executed as part of timer. In this case we will make sure that all
diff --git a/playbooks/roles/zuul-rebase/tasks/main.yml b/playbooks/roles/zuul-rebase/tasks/main.yml
index ca6e2c0..7b39815 100644
--- a/playbooks/roles/zuul-rebase/tasks/main.yml
+++ b/playbooks/roles/zuul-rebase/tasks/main.yml
@@ -19,7 +19,7 @@
     executable: /bin/bash
 
 - name: Fetch and rebase with nordix gerrit
-  script: fetch-rebase.sh
+  script: fetch-rebase.sh "{{ GERRIT_USER }}" "{{ PROJECT }}" "{{ NORDIX_REMOTE }}"
   args:
     chdir: /home/ubuntu/zuul
     executable: /bin/bash
diff --git a/playbooks/roles/zuul-rebase/vars/main.yaml b/playbooks/roles/zuul-rebase/vars/main.yaml
index 98e8b0e..3f68c71 100644
--- a/playbooks/roles/zuul-rebase/vars/main.yaml
+++ b/playbooks/roles/zuul-rebase/vars/main.yaml
@@ -2,4 +2,4 @@
 GERRIT_USER: "zuul"
 GIT_BASE_HTTPS: "https://review.opendev.org"
 GIT_BASE_SSH: "ssh://{{ GERRIT_USER }}@review.opendev.org:29418"
-PROJECT: "zuul/zuul"
+NORDIX_REMOTE: "ssh://{{ GERRIT_USER }}@gerrit.nordix.org:29418/opendev/{{ PROJECT }}.git"
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index 857879d..7103496 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -10,7 +10,7 @@
     timeout: 1800
     nodeset:
       nodes:
-        - name: infra-build-ubuntu1804-base 
+        - name: infra-build-ubuntu1804-base
           label: infra-build-ubuntu1804-base
     secrets:
       - secret: key
@@ -18,6 +18,24 @@
 
 - job:
     name: opendev-zuul-rebase-01
-    branches: 
+    branches:
       - master
-    run: playbooks/opendev-zuul-rebase-01.yaml
+    vars:
+      PROJECT: "zuul/zuul"
+    run: playbooks/opendev-zuul-rebase.yaml
+
+- job:
+    name: opendev-zuul-jobs-rebase-01
+    branches:
+      - master
+    vars:
+      PROJECT: "zuul/zuul-jobs"
+    run: playbooks/opendev-zuul-rebase.yaml
+
+- job:
+    name: opendev-zuul-zuul-base-jobs-rebase-01
+    branches:
+      - master
+    vars:
+      PROJECT: "zuul/zuul-base-jobs"
+    run: playbooks/opendev-zuul-rebase.yaml
diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml
index f6f2c99..aae8377 100644
--- a/zuul.d/projects.yaml
+++ b/zuul.d/projects.yaml
@@ -19,7 +19,11 @@
     periodic:
       jobs:
         - opendev-zuul-rebase-01
+        - opendev-zuul-jobs-rebase-01
+        - opendev-zuul-zuul-base-jobs-rebase-01
 
     opendev-merge-check:
       jobs:
         - opendev-zuul-rebase-01
+        - opendev-zuul-jobs-rebase-01
+        - opendev-zuul-zuul-base-jobs-rebase-01