Revert "Remove debian and oss jobs. It was moved into infra model"

This reverts commit 5415276dc216866f9e5669cad5b498cda8adae0f.

Change-Id: If38ed3bae2722b67a99adf5acb3d3aa302facc47
diff --git a/jenkins/client/job/debian/packages/ceph.yml b/jenkins/client/job/debian/packages/ceph.yml
index 2500254..5307b4b 100644
--- a/jenkins/client/job/debian/packages/ceph.yml
+++ b/jenkins/client/job/debian/packages/ceph.yml
@@ -1,2 +1,77 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-ceph-package:
+          name: build-debian-{{package}}-{{version}}-ubuntu-{{dist}}
+          jobs:
+            # Xenial
+            - package: ceph
+              dist: xenial
+              branch: debian/xenial-luminous
+              version: luminous
+            - package: ceph
+              dist: xenial
+              branch: debian/xenial-jewel
+              version: jewel
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  debian/{{package}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/debian/{{package}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb ${_param:jenkins_aptly_url}/{{dist}}/ testing ceph"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "ubuntu-{{dist}}-{{package}}-{{version}}"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'
\ No newline at end of file
diff --git a/jenkins/client/job/debian/packages/extra.yml b/jenkins/client/job/debian/packages/extra.yml
index 2500254..f3475b3 100644
--- a/jenkins/client/job/debian/packages/extra.yml
+++ b/jenkins/client/job/debian/packages/extra.yml
@@ -1,2 +1,278 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian:
+          name: build-debian-{{package}}-ubuntu-{{dist}}
+          jobs:
+            - package: librdkafka
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-kafka
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: liburcu
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-kazoo
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-pathlib
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: kafka
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-geventhttpclient
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-consistent-hash
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: libipfix
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-ncclient
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-pycassa
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-xmltodict
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-backports.ssl-match-hostname
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-certifi
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-docker
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-cassandra-driver
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-redis
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-tabulate
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: cassandra-cpp-driver
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: libuv1
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: python-sseclient
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: reclass
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: jmx-exporter
+              dist: trusty
+              build: jmx-exporter
+              branch: master
+            - package: python-bitstring
+              dist: trusty
+              build: pipeline
+              branch: debian/trusty
+            - package: libvirt-exporter
+              dist: trusty
+              build: libvirt-exporter
+              branch: master
+            - package: librdkafka
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-kafka
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-geventhttpclient
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-pydbus
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-docker
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-consistent-hash
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: libipfix
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: cassandra-cpp-driver
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-sseclient
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: reclass
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: telegraf
+              dist: trusty
+              build: telegraf
+              branch: release-1.5
+            - package: telegraf
+              dist: xenial
+              build: telegraf
+              branch: release-1.5
+            - package: libvirt-exporter
+              dist: xenial
+              build: libvirt-exporter
+              branch: master
+            - package: kafka
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-cassandra-driver
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: jmx-exporter
+              dist: xenial
+              build: jmx-exporter
+              branch: master
+            - package: influxdb-relay
+              dist: xenial
+              build: influxdb-relay
+              branch: master
+            - package: prometheus-relay
+              dist: trusty
+              build: prometheus-relay
+              branch: master
+            - package: prometheus-relay
+              dist: xenial
+              build: prometheus-relay
+              branch: master
+            - package: python-datrie
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: contrail-api-cli
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: gerritlib
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-pygerrit2
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: jeepyb
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: salt-pepper
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+            - package: python-backports.ssl-match-hostname
+              dist: xenial
+              build: pipeline
+              branch: debian/xenial
+          template:
+            type: workflow-scm
+            concurrent: false
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-{{build}}.groovy
+            trigger:
+              gerrit:
+                project:
+                  debian/{{package}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/debian/{{package}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb ${_param:jenkins_aptly_url}/{{dist}}/ testing extra"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "ubuntu-{{dist}}-extra"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              PPA:
+                type: string
+                default: "mirantis-opencontrail/extra"
+              UPLOAD_PPA:
+                type: boolean
+                default: 'true'
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'
diff --git a/jenkins/client/job/debian/packages/heat/resources.yml b/jenkins/client/job/debian/packages/heat/resources.yml
index 2500254..92bdbe0 100644
--- a/jenkins/client/job/debian/packages/heat/resources.yml
+++ b/jenkins/client/job/debian/packages/heat/resources.yml
@@ -1,2 +1,91 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-heat-resources:
+          name: build-debian-{{name}}-{{os}}-{{dist}}
+          jobs:
+            # Trusty
+            - name: heat-resource-salt
+              os: ubuntu
+              dist: trusty
+              branch: master
+            # Xenial
+            - name: heat-resource-salt
+              os: ubuntu
+              dist: xenial
+              branch: master
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  salt-formulas/{{name}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "git@github.com:salt-formulas/heat-resource-salt.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "github-credentials"
+              DEBIAN_SNAPSHOT:
+                type: boolean
+                default: 'true'
+              REVISION_POSTFIX:
+                type: string
+                default: '~{{dist}}1'
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb ${_param:jenkins_aptly_url}/{{dist}}/ testing extra"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "{{os}}-{{dist}}-extra"
+              OS:
+                type: string
+                default: "{{os}}"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'
+              PRE_BUILD_SCRIPT:
+                type: text
+                default: |
+                  echo "deb http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/ mos9.0 main restricted" >> /etc/apt/sources.list.d/extra.list
+                  curl --insecure -ss -f "http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/archive-mos9.0.key" | apt-key add -
+                  apt-get update
+
diff --git a/jenkins/client/job/debian/packages/horizon/init.yml b/jenkins/client/job/debian/packages/horizon/init.yml
index 2500254..a899680 100644
--- a/jenkins/client/job/debian/packages/horizon/init.yml
+++ b/jenkins/client/job/debian/packages/horizon/init.yml
@@ -1,2 +1,3 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+classes:
+  - system.jenkins.client.job.debian.packages.horizon.modules
+  - system.jenkins.client.job.debian.packages.horizon.themes
diff --git a/jenkins/client/job/debian/packages/horizon/modules.yml b/jenkins/client/job/debian/packages/horizon/modules.yml
index 2500254..357be6e 100644
--- a/jenkins/client/job/debian/packages/horizon/modules.yml
+++ b/jenkins/client/job/debian/packages/horizon/modules.yml
@@ -1,2 +1,242 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-horizon-module:
+          name: build-debian-horizon-module-{{name}}-{{os_version}}-{{os}}-{{dist}}
+          jobs:
+            # Trusty
+            - name: horizon-avi-panels
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: stable/mitaka
+            # Xenial
+            - name: horizon-avi-panels
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: stable/mitaka
+            # Trusty
+            - name: horizon-neutron-lbaasv2-panel
+              os: ubuntu
+              dist: trusty
+              os_version: ocata
+              branch: stable/ocata
+            # Xenial
+            - name: horizon-neutron-lbaasv2-panel
+              os: ubuntu
+              dist: xenial
+              os_version: ocata
+              branch: stable/ocata
+            # Trusty
+            - name: horizon-neutron-lbaasv2-panel
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: stable/mitaka
+            # Xenial
+            - name: horizon-neutron-lbaasv2-panel
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: stable/mitaka
+            # Trusty
+            - name: horizon-overrides-plugin
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: master
+            # Xenial
+            - name: horizon-overrides-plugin
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: master
+            # Trusty
+            - name: horizon-overrides-plugin
+              os: ubuntu
+              dist: trusty
+              os_version: ocata
+              branch: master
+            # Xenial
+            - name: horizon-overrides-plugin
+              os: ubuntu
+              dist: xenial
+              os_version: ocata
+              branch: master
+            # Trusty
+            - name: horizon-contrib
+              os: ubuntu
+              dist: trusty
+              os_version: ocata
+              branch: master
+            # Xenial
+            - name: horizon-contrib
+              os: ubuntu
+              dist: xenial
+              os_version: ocata
+              branch: master
+            # Trusty
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: stable/mitaka
+            # Xenial
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: stable/mitaka
+            # Trusty
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: trusty
+              os_version: newton
+              branch: stable/newton
+            # Xenial
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: xenial
+              os_version: newton
+              branch: stable/newton
+            # Trusty
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: trusty
+              os_version: ocata
+              branch: stable/ocata
+            # Xenial
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: xenial
+              os_version: ocata
+              branch: stable/ocata
+            # Trusty
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: trusty
+              os_version: pike
+              branch: stable/pike
+            # Xenial
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: xenial
+              os_version: pike
+              branch: stable/pike
+            # Trusty
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: trusty
+              os_version: queens
+              branch: stable/queens
+            # Xenial
+            - name: horizon-contrail-panels
+              os: ubuntu
+              dist: xenial
+              os_version: queens
+              branch: stable/queens
+            # Trusty
+            - name: horizon-jenkins-dashboard
+              os: ubuntu
+              dist: trusty
+              os_version: liberty
+              branch: stable/liberty
+            # Xenial
+            - name: horizon-jenkins-dashboard
+              os: ubuntu
+              dist: xenial
+              os_version: liberty
+              branch: stable/liberty
+            # Trusty
+            - name: horizon-telemetry-dashboard
+              os: ubuntu
+              dist: trusty
+              os_version: liberty
+              branch: stable/liberty
+            # Xenial
+            - name: horizon-telemetry-dashboard
+              os: ubuntu
+              dist: xenial
+              os_version: liberty
+              branch: stable/liberty
+            # Trusty
+            - name: horizon-telemetry-dashboard
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: stable/mitaka
+            # Xenial
+            - name: horizon-telemetry-dashboard
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: stable/mitaka
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  horizon-modules/{{name}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/horizon-modules/{{name}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              DEBIAN_SNAPSHOT:
+                type: boolean
+                default: 'true'
+              REVISION_POSTFIX:
+                type: string
+                default: '~{{os_version}}1{{dist}}1'
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb ${_param:jenkins_aptly_url}/{{dist}}/ testing extra {{os_version}}"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "{{os}}-{{dist}}-{{os_version}}"
+              OS:
+                type: string
+                default: "{{os}}"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'
diff --git a/jenkins/client/job/debian/packages/horizon/themes.yml b/jenkins/client/job/debian/packages/horizon/themes.yml
index 2500254..dbaab83 100644
--- a/jenkins/client/job/debian/packages/horizon/themes.yml
+++ b/jenkins/client/job/debian/packages/horizon/themes.yml
@@ -1,2 +1,98 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-horizon-theme:
+          name: build-debian-horizon-theme-{{name}}-{{os_version}}-{{os}}-{{dist}}
+          jobs:
+            # Trusty
+            - name: horizon-mirantis-theme
+              os: ubuntu
+              dist: trusty
+              os_version: mitaka
+              branch: stable/mitaka
+            # Xenial
+            - name: horizon-mirantis-theme
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              branch: stable/mitaka
+            # Trusty
+            - name: horizon-mirantis-theme
+              os: ubuntu
+              dist: trusty
+              os_version: ocata
+              branch: stable/ocata
+            # Xenial
+            - name: horizon-mirantis-theme
+              os: ubuntu
+              dist: xenial
+              os_version: ocata
+              branch: stable/ocata
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  horizon-themes/{{name}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/horizon-themes/{{name}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              DEBIAN_SNAPSHOT:
+                type: boolean
+                default: 'true'
+              REVISION_POSTFIX:
+                type: string
+                default: '~{{os_version}}1{{dist}}1'
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb ${_param:jenkins_aptly_url}/{{dist}}/ testing extra {{os_version}}"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "{{os}}-{{dist}}-{{os_version}}"
+              OS:
+                type: string
+                default: "{{os}}"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'
diff --git a/jenkins/client/job/debian/packages/init.yml b/jenkins/client/job/debian/packages/init.yml
index 2500254..4196f95 100644
--- a/jenkins/client/job/debian/packages/init.yml
+++ b/jenkins/client/job/debian/packages/init.yml
@@ -1,2 +1,19 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+classes:
+  - system.jenkins.client.job.debian.packages.extra
+  - system.jenkins.client.job.debian.packages.salt
+  - system.jenkins.client.job.debian.packages.salt-multi
+  - system.jenkins.client.job.debian.packages.horizon
+  - system.jenkins.client.job.debian.packages.heat.resources
+  - system.jenkins.client.job.debian.packages.ceph
+parameters:
+  jenkins:
+    client:
+      view:
+        Xenial:
+          enabled: true
+          type: ListView
+          include_regex: "build-.*-ubuntu-xenial.*"
+        Trusty:
+          enabled: true
+          type: ListView
+          include_regex: "build-.*-ubuntu-trusty.*"
\ No newline at end of file
diff --git a/jenkins/client/job/debian/packages/salt-multi.yml b/jenkins/client/job/debian/packages/salt-multi.yml
index 2500254..b58b801 100644
--- a/jenkins/client/job/debian/packages/salt-multi.yml
+++ b/jenkins/client/job/debian/packages/salt-multi.yml
@@ -1,2 +1,144 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-salt-multibranch:
+          name: build-debian-salt-formula-{{name}}-ubuntu-{{dist}}
+          jobs:
+            - name: ceilometer
+              upload_source_package: false
+              dist: trusty
+            - name: cinder
+              upload_source_package: false
+              dist: trusty
+            - name: glance
+              upload_source_package: false
+              dist: trusty
+            - name: heat
+              upload_source_package: false
+              dist: trusty
+            - name: horizon
+              upload_source_package: false
+              dist: trusty
+            - name: keystone
+              upload_source_package: false
+              dist: trusty
+            - name: kubernetes
+              upload_source_package: false
+              dist: trusty
+            - name: neutron
+              upload_source_package: false
+              dist: trusty
+            - name: nova
+              upload_source_package: false
+              dist: trusty
+            - name: swift
+              upload_source_package: false
+              dist: trusty
+            - name: ceilometer
+              upload_source_package: true
+              dist: xenial
+            - name: cinder
+              upload_source_package: true
+              dist: xenial
+            - name: glance
+              upload_source_package: true
+              dist: xenial
+            - name: heat
+              upload_source_package: true
+              dist: xenial
+            - name: horizon
+              upload_source_package: true
+              dist: xenial
+            - name: keystone
+              upload_source_package: true
+              dist: xenial
+            - name: kubernetes
+              upload_source_package: true
+              dist: xenial
+            - name: neutron
+              upload_source_package: true
+              dist: xenial
+            - name: nova
+              upload_source_package: true
+              dist: xenial
+            - name: swift
+              upload_source_package: false
+              dist: xenial
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  salt-formulas/{{name}}:
+                    branches:
+                      - master
+                      - debian/{{dist}}
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/salt-formulas/{{name}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "master"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              DEBIAN_BRANCH:
+                type: string
+                default: 'debian/{{dist}}'
+              DEBIAN_SNAPSHOT:
+                type: boolean
+                default: 'true'
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main; deb ${_param:jenkins_aptly_url}/{{dist}}/ testing salt"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub; ${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "ubuntu-{{dist}}-salt"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              PPA:
+                type: string
+                default: "salt-formulas/ppa"
+              UPLOAD_PPA:
+                type: boolean
+                default: 'true'
+              UPLOAD_APTLY:
+                type: boolean
+                default: '{{upload_source_package}}'
+              DEBUG:
+                type: boolean
+                default: 'false'
diff --git a/jenkins/client/job/debian/packages/salt.yml b/jenkins/client/job/debian/packages/salt.yml
index 2500254..ee8c9ef 100644
--- a/jenkins/client/job/debian/packages/salt.yml
+++ b/jenkins/client/job/debian/packages/salt.yml
@@ -1,2 +1,475 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-salt-formula:
+          name: build-debian-salt-formula-{{name}}-ubuntu-{{dist}}
+          jobs:
+            - name: aodh
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: apache
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: aptcacher
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: aptly
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: artifactory
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: avinetworks
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: auditd
+              upload_source_packages: false
+              upload_to_aptly: true
+              dist: xenial
+            - name: barbican
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: baremetal-simulator
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: backupninja
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: bind
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: bird
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: cadf
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: calico
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: cassandra
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: ceph
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: chrony
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: collectd
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: debmirror
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: dekapod
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: designate
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: devops-portal
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: docker
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: dogtag
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: elasticsearch
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: etcd
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: fluentbit
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: fluentd
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: freeipa
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: galera
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: gerrit
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: git
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: gitlab
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: glusterfs
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: gnocchi
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: grafana
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: haproxy
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: heka
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: heketi
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: helm
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: hubble
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: influxdb
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: iptables
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: ironic
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: isc-dhcp
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: java
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: jenkins
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: keepalived
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: keycloak
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: kibana
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: letsencrypt
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: libvirt
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: linux
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: lldp
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: logrotate
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: maas
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: manila
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: memcached
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: mirascan
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: monasca
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: mongodb
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: murano
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: mysql
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: nfs
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: nginx
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: ntp
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: octavia
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: opencontrail
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: openldap
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: openscap
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: openssh
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: openvpn
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: oslo-templates
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: panko
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: postgresql
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: prometheus
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: powerdns
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: python
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: rabbitmq
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: reclass
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: redis
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: rsync
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: rundeck
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: rsyslog
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: runtest
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: sahara
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: salt
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: sensu
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: shibboleth
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: sphinx
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: spinnaker
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: statsd
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: telegraf
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: tinyproxy
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: tftpd-hpa
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: watchdog
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: xtrabackup
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+            - name: zookeeper
+              upload_source_package: true
+              upload_to_aptly: true
+              dist: xenial
+          template:
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  salt-formulas/{{name}}:
+                    branches:
+                      - master
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/salt-formulas/{{name}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "master"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              DEBIAN_SNAPSHOT:
+                type: boolean
+                default: 'true'
+              REVISION_POSTFIX:
+                type: string
+                default: '~{{dist}}1'
+              EXTRA_REPO_URL:
+                type: string
+                default: "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main; deb ${_param:jenkins_aptly_url}/{{dist}}/ testing salt"
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub; ${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "ubuntu-{{dist}}-salt"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              PPA:
+                type: string
+                default: "salt-formulas/ppa"
+              UPLOAD_PPA:
+                type: boolean
+                default: '{{upload_source_package}}'
+              UPLOAD_APTLY:
+                type: boolean
+                default: '{{upload_to_aptly}}'
+              DEBUG:
+                type: boolean
+                default: 'false'
diff --git a/jenkins/client/job/debian/packages/testing.yml b/jenkins/client/job/debian/packages/testing.yml
index 2500254..84ff1cc 100644
--- a/jenkins/client/job/debian/packages/testing.yml
+++ b/jenkins/client/job/debian/packages/testing.yml
@@ -1,2 +1,80 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+  _param:
+    jenkins_pollscm_spec: "H/60 * * * *"
+  jenkins:
+    client:
+      job_template:
+        build-debian-python-flask-hello:
+          name: build-debian-{{package}}-ubuntu-{{dist}}
+          jobs:
+            - package: python-flask-hello
+              dist: trusty
+              build: pipeline
+              branch: master
+          template:
+            type: workflow-scm
+            concurrent: false
+            discard:
+              build:
+                keep_num: 10
+              artifact:
+                keep_num: 10
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              branch: "${_param:jenkins_pipelines_branch}"
+              credentials: "gerrit"
+              script: build-debian-packages-{{build}}.groovy
+            trigger:
+              gerrit:
+                project:
+                  mk/{{package}}:
+                    branches:
+                      - "{{branch}}"
+                message:
+                  build_successful: "Build successful"
+                  build_unstable: "Build unstable"
+                  build_failure: "Build failed"
+                event:
+                  ref:
+                    - updated
+            param:
+              SOURCE_URL:
+                type: string
+                default: "${_param:jenkins_gerrit_url}/mk/python-flask-hello"
+              SOURCE_BRANCH:
+                type: string
+                default: "{{branch}}"
+              SOURCE_CREDENTIALS:
+                type: string
+                default: "gerrit"
+              EXTRA_REPO_URL:
+                type: string
+                default: ""
+              EXTRA_REPO_KEY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_url}/public.gpg"
+              APTLY_URL:
+                type: string
+                default: "${_param:jenkins_aptly_api_url}"
+              APTLY_REPO:
+                type: string
+                default: "ubuntu-{{dist}}-extra"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
+              PPA:
+                type: string
+                default: "mirantis-opencontrail/extra"
+              UPLOAD_PPA:
+                type: boolean
+                default: 'false'
+              UPLOAD_APTLY:
+                type: boolean
+                default: 'true'