Refactor jenkins jobs structure

Change-Id: Ia54cc5a76e3de06f16fd602b78891826d73a4c01
diff --git a/jenkins/client/job/git-mirrors/upstream.yml b/jenkins/client/job/git-mirrors/downstream/init.yml
similarity index 73%
copy from jenkins/client/job/git-mirrors/upstream.yml
copy to jenkins/client/job/git-mirrors/downstream/init.yml
index f4f7f50..9333e6a 100644
--- a/jenkins/client/job/git-mirrors/upstream.yml
+++ b/jenkins/client/job/git-mirrors/downstream/init.yml
@@ -1,18 +1,12 @@
 parameters:
+  _param:
+    jenkins_git_mirror_downstream_jobs: []
   jenkins:
     client:
       job_template:
-        git_mirror_upstream_common:
-          name: git-mirror-upstream-{{name}}
-          jobs:
-            - name: pipeline-library
-              downstream: mcp-ci/pipeline-library.git
-              upstream: "git@github.com:Mirantis/pipeline-library.git"
-              branches: master
-            - name: mk-pipelines
-              downstream: mk/mk-pipelines.git
-              upstream: "git@github.com:Mirantis/mk-pipelines.git"
-              branches: master
+        git_mirror_downstream_common:
+          name: git-mirror-downstream-{{name}}
+          jobs: ${_param:jenkins_git_mirror_downstream_jobs}
           template:
             discard:
               build:
@@ -42,10 +36,10 @@
             param:
               SOURCE_URL:
                 type: string
-                default: "${_param:jenkins_gerrit_url}/{{downstream}}"
+                default: "{{upstream}}"
               TARGET_URL:
                 type: string
-                default: "{{upstream}}"
+                default: "${_param:jenkins_gerrit_url}/{{downstream}}"
               CREDENTIALS_ID:
                 type: string
                 default: "gerrit"
diff --git a/jenkins/client/job/git-mirrors/downstream/pipelines.yml b/jenkins/client/job/git-mirrors/downstream/pipelines.yml
new file mode 100644
index 0000000..8f7858e
--- /dev/null
+++ b/jenkins/client/job/git-mirrors/downstream/pipelines.yml
@@ -0,0 +1,13 @@
+classes:
+  - system.jenkins.client.job.git-mirrors.downstream
+parameters:
+  _param:
+    jenkins_git_mirror_downstream_jobs:
+      - name: pipeline-library
+        downstream: mcp-ci/pipeline-library.git
+        upstream: "git@github.com:Mirantis/pipeline-library.git"
+        branches: master
+      - name: mk-pipelines
+        downstream: mk/mk-pipelines.git
+        upstream: "git@github.com:Mirantis/mk-pipelines.git"
+        branches: master
diff --git a/jenkins/client/job/git-mirrors/upstream.yml b/jenkins/client/job/git-mirrors/upstream/init.yml
similarity index 77%
rename from jenkins/client/job/git-mirrors/upstream.yml
rename to jenkins/client/job/git-mirrors/upstream/init.yml
index f4f7f50..e11e63c 100644
--- a/jenkins/client/job/git-mirrors/upstream.yml
+++ b/jenkins/client/job/git-mirrors/upstream/init.yml
@@ -1,18 +1,12 @@
 parameters:
+  _param:
+    jenkins_git_mirror_upstream_jobs: []
   jenkins:
     client:
       job_template:
         git_mirror_upstream_common:
           name: git-mirror-upstream-{{name}}
-          jobs:
-            - name: pipeline-library
-              downstream: mcp-ci/pipeline-library.git
-              upstream: "git@github.com:Mirantis/pipeline-library.git"
-              branches: master
-            - name: mk-pipelines
-              downstream: mk/mk-pipelines.git
-              upstream: "git@github.com:Mirantis/mk-pipelines.git"
-              branches: master
+          jobs: ${_param:jenkins_git_mirror_upstream_jobs}
           template:
             discard:
               build:
diff --git a/jenkins/client/job/git-mirrors/upstream/pipelines.yml b/jenkins/client/job/git-mirrors/upstream/pipelines.yml
new file mode 100644
index 0000000..35f7df1
--- /dev/null
+++ b/jenkins/client/job/git-mirrors/upstream/pipelines.yml
@@ -0,0 +1,13 @@
+classes:
+  - system.jenkins.client.job.git-mirrors.upstream
+parameters:
+  _param:
+    jenkins_git_mirror_upstream_jobs:
+      - name: pipeline-library
+        downstream: mcp-ci/pipeline-library.git
+        upstream: "git@github.com:Mirantis/pipeline-library.git"
+        branches: master
+      - name: mk-pipelines
+        downstream: mk/mk-pipelines.git
+        upstream: "git@github.com:Mirantis/mk-pipelines.git"
+        branches: master