Add jenkins jobs
diff --git a/jenkins/client/job/debian/init.yml b/jenkins/client/job/debian/init.yml
new file mode 100644
index 0000000..b5b2ebd
--- /dev/null
+++ b/jenkins/client/job/debian/init.yml
@@ -0,0 +1,2 @@
+classes:
+  - system_extra.jenkins.client.job.debian.packages
diff --git a/jenkins/client/job/debian/packages/extra.yml b/jenkins/client/job/debian/packages/extra.yml
new file mode 100644
index 0000000..3681993
--- /dev/null
+++ b/jenkins/client/job/debian/packages/extra.yml
@@ -0,0 +1,117 @@
+classes:
+  - system_extra.jenkins.client.job.common
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian:
+          name: build-debian-{{package}}-ubuntu-{{dist}}
+          jobs:
+            - package: librdkafka
+              dist: trusty
+            - package: python-kafka
+              dist: trusty
+            - package: liburcu
+              dist: trusty
+            - package: python-kazoo
+              dist: trusty
+            - package: python-pathlib
+              dist: trusty
+            - package: kafka
+              dist: trusty
+            - package: python-geventhttpclient
+              dist: trusty
+            - package: python-consistent-hash
+              dist: trusty
+            - package: libipfix
+              dist: trusty
+            - package: python-ncclient
+              dist: trusty
+            - package: python-pycassa
+              dist: trusty
+            - package: python-xmltodict
+              dist: trusty
+            - package: python-backports.ssl-match-hostname
+              dist: trusty
+            - package: python-certifi
+              dist: trusty
+            - package: python-docker
+              dist: trusty
+            - package: python-cassandra-driver
+              dist: trusty
+            - package: python-redis
+              dist: trusty
+            - package: python-tabulate
+              dist: trusty
+            - package: cassandra-cpp-driver
+              dist: trusty
+            - package: libuv1
+              dist: trusty
+            - package: python-sseclient
+              dist: trusty
+            - package: librdkafka
+              dist: xenial
+            - package: python-kafka
+              dist: xenial
+            - package: python-geventhttpclient
+              dist: xenial
+            - package: python-consistent-hash
+              dist: xenial
+            - package: libipfix
+              dist: xenial
+            - package: cassandra-cpp-driver
+              dist: xenial
+            - package: python-sseclient
+              dist: xenial
+          template:
+            type: workflow-scm
+            concurrent: false
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+              credentials: "gerrit"
+              script: build-debian-packages-pipeline.groovy
+            trigger:
+              gerrit:
+                project:
+                  debian/{{package}}:
+                    branches:
+                      - 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}/debian/{{package}}.git"
+              SOURCE_BRANCH:
+                type: string
+                default: "debian/{{dist}}"
+              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"
diff --git a/jenkins/client/job/debian/packages/horizon/init.yml b/jenkins/client/job/debian/packages/horizon/init.yml
new file mode 100644
index 0000000..827f11a
--- /dev/null
+++ b/jenkins/client/job/debian/packages/horizon/init.yml
@@ -0,0 +1,3 @@
+classes:
+  - system_extra.jenkins.client.job.debian.packages.horizon.modules
+  - system_extra.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
new file mode 100644
index 0000000..29336e9
--- /dev/null
+++ b/jenkins/client/job/debian/packages/horizon/modules.yml
@@ -0,0 +1,84 @@
+classes:
+  - system_extra.jenkins.client.job.common
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-horizon-module:
+          name: build-debian-horizon-module-{{name}}-{{os_version}}-{{os}}-{{dist}}
+          jobs:
+            # 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
+          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"
+              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: "${_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"
diff --git a/jenkins/client/job/debian/packages/horizon/themes.yml b/jenkins/client/job/debian/packages/horizon/themes.yml
new file mode 100644
index 0000000..e6989b9
--- /dev/null
+++ b/jenkins/client/job/debian/packages/horizon/themes.yml
@@ -0,0 +1,84 @@
+classes:
+  - system_extra.jenkins.client.job.common
+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: master
+            # Xenial
+            - name: horizon-mirantis-theme
+              os: ubuntu
+              dist: xenial
+              os_version: mitaka
+              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"
+              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: "${_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"
diff --git a/jenkins/client/job/debian/packages/init.yml b/jenkins/client/job/debian/packages/init.yml
new file mode 100644
index 0000000..972b7df
--- /dev/null
+++ b/jenkins/client/job/debian/packages/init.yml
@@ -0,0 +1,5 @@
+classes:
+  - system_extra.jenkins.client.job.debian.packages.extra
+  - system_extra.jenkins.client.job.debian.packages.salt
+  - system_extra.jenkins.client.job.debian.packages.salt-multi
+  - system_extra.jenkins.client.job.debian.packages.horizon
diff --git a/jenkins/client/job/debian/packages/salt-multi.yml b/jenkins/client/job/debian/packages/salt-multi.yml
new file mode 100644
index 0000000..35e1aa9
--- /dev/null
+++ b/jenkins/client/job/debian/packages/salt-multi.yml
@@ -0,0 +1,113 @@
+classes:
+  - system_extra.jenkins.client.job.common
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-salt-multibranch:
+          name: build-debian-salt-formula-{{name}}-ubuntu-{{dist}}
+          jobs:
+            - name: ceilometer
+              dist: trusty
+            - name: cinder
+              dist: trusty
+            - name: glance
+              dist: trusty
+            - name: heat
+              dist: trusty
+            - name: horizon
+              dist: trusty
+            - name: keystone
+              dist: trusty
+            - name: kubernetes
+              dist: trusty
+            - name: neutron
+              dist: trusty
+            - name: nova
+              dist: trusty
+            - name: swift
+              dist: trusty
+            - name: ceilometer
+              dist: xenial
+            - name: cinder
+              dist: xenial
+            - name: glance
+              dist: xenial
+            - name: heat
+              dist: xenial
+            - name: horizon
+              dist: xenial
+            - name: keystone
+              dist: xenial
+            - name: kubernetes
+              dist: xenial
+            - name: neutron
+              dist: xenial
+            - name: nova
+              dist: xenial
+            - name: swift
+              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"
+              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 ${_param:jenkins_aptly_url}/{{dist}}/ testing salt salt-latest"
+              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}}-salt"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"
diff --git a/jenkins/client/job/debian/packages/salt.yml b/jenkins/client/job/debian/packages/salt.yml
new file mode 100644
index 0000000..73eedef
--- /dev/null
+++ b/jenkins/client/job/debian/packages/salt.yml
@@ -0,0 +1,404 @@
+classes:
+  - system_extra.jenkins.client.job.common
+parameters:
+  jenkins:
+    client:
+      job_template:
+        build-debian-salt-formula:
+          name: build-debian-salt-formula-{{name}}-ubuntu-{{dist}}
+          jobs:
+            - name: aodh
+              dist: trusty
+            - name: apache
+              dist: trusty
+            - name: aptly
+              dist: trusty
+            - name: artifactory
+              dist: trusty
+            - name: avinetworks
+              dist: trusty
+            - name: backupninja
+              dist: trusty
+            - name: billometer
+              dist: trusty
+            - name: bind
+              dist: trusty
+            - name: bird
+              dist: trusty
+            - name: cadf
+              dist: trusty
+            - name: calico
+              dist: trusty
+            - name: cassandra
+              dist: trusty
+            - name: ccp
+              dist: trusty
+            - name: ceph
+              dist: trusty
+            - name: chrony
+              dist: trusty
+            - name: collectd
+              dist: trusty
+            - name: dekapod
+              dist: trusty
+            - name: docker
+              dist: trusty
+            - name: dovecot
+              dist: trusty
+            - name: elasticsearch
+              dist: trusty
+            - name: etcd
+              dist: trusty
+            - name: foreman
+              dist: trusty
+            - name: freeipa
+              dist: trusty
+            - name: galera
+              dist: trusty
+            - name: gerrit
+              dist: trusty
+            - name: git
+              dist: trusty
+            - name: gitlab
+              dist: trusty
+            - name: glusterfs
+              dist: trusty
+            - name: grafana
+              dist: trusty
+            - name: graphite
+              dist: trusty
+            - name: haproxy
+              dist: trusty
+            - name: heka
+              dist: trusty
+            - name: influxdb
+              dist: trusty
+            - name: iptables
+              dist: trusty
+            - name: isc-dhcp
+              dist: trusty
+            - name: java
+              dist: trusty
+            - name: jenkins
+              dist: trusty
+            - name: kedb
+              dist: trusty
+            - name: keepalived
+              dist: trusty
+            - name: kibana
+              dist: trusty
+            - name: letsencrypt
+              dist: trusty
+            - name: libvirt
+              dist: trusty
+            - name: linux
+              dist: trusty
+            - name: logrotate
+              dist: trusty
+            - name: maas
+              dist: trusty
+            - name: magnum
+              dist: trusty
+            - name: memcached
+              dist: trusty
+            - name: midonet
+              dist: trusty
+            - name: monasca
+              dist: trusty
+            - name: mongodb
+              dist: trusty
+            - name: murano
+              dist: trusty
+            - name: mysql
+              dist: trusty
+            - name: nagios
+              dist: trusty
+            - name: network
+              dist: trusty
+            - name: nfs
+              dist: trusty
+            - name: nginx
+              dist: trusty
+            - name: nodejs
+              dist: trusty
+            - name: ntp
+              dist: trusty
+            - name: opencontrail
+              dist: trusty
+            - name: openssh
+              dist: trusty
+            - name: openvpn
+              dist: trusty
+            - name: openvstorage
+              dist: trusty
+            - name: owncloud
+              dist: trusty
+            - name: postfix
+              dist: trusty
+            - name: postgresql
+              dist: trusty
+            - name: pritunl
+              dist: trusty
+            - name: python
+              dist: trusty
+            - name: rabbitmq
+              dist: trusty
+            - name: reclass
+              dist: trusty
+            - name: redis
+              dist: trusty
+            - name: roundcube
+              dist: trusty
+            - name: rsync
+              dist: trusty
+            - name: rsyslog
+              dist: trusty
+            - name: sahara
+              dist: trusty
+            - name: salt
+              dist: trusty
+            - name: sensu
+              dist: trusty
+            - name: sentry
+              dist: trusty
+            - name: sphinx
+              dist: trusty
+            - name: statsd
+              dist: trusty
+            - name: supervisor
+              dist: trusty
+            - name: taiga
+              dist: trusty
+            - name: varnish
+              dist: trusty
+            - name: zookeeper
+              dist: trusty
+            - name: aodh
+              dist: xenial
+            - name: apache
+              dist: xenial
+            - name: aptly
+              dist: xenial
+            - name: artifactory
+              dist: xenial
+            - name: avinetworks
+              dist: xenial
+            - name: backupninja
+              dist: xenial
+            - name: billometer
+              dist: xenial
+            - name: bind
+              dist: xenial
+            - name: bird
+              dist: xenial
+            - name: cadf
+              dist: xenial
+            - name: calico
+              dist: xenial
+            - name: cassandra
+              dist: xenial
+            - name: ccp
+              dist: xenial
+            - name: ceph
+              dist: xenial
+            - name: chrony
+              dist: xenial
+            - name: collectd
+              dist: xenial
+            - name: dekapod
+              dist: xenial
+            - name: docker
+              dist: xenial
+            - name: dovecot
+              dist: xenial
+            - name: elasticsearch
+              dist: xenial
+            - name: etcd
+              dist: xenial
+            - name: foreman
+              dist: xenial
+            - name: freeipa
+              dist: xenial
+            - name: galera
+              dist: xenial
+            - name: gerrit
+              dist: xenial
+            - name: git
+              dist: xenial
+            - name: gitlab
+              dist: xenial
+            - name: glusterfs
+              dist: xenial
+            - name: grafana
+              dist: xenial
+            - name: graphite
+              dist: xenial
+            - name: haproxy
+              dist: xenial
+            - name: heka
+              dist: xenial
+            - name: influxdb
+              dist: xenial
+            - name: iptables
+              dist: xenial
+            - name: isc-dhcp
+              dist: xenial
+            - name: java
+              dist: xenial
+            - name: jenkins
+              dist: xenial
+            - name: kedb
+              dist: xenial
+            - name: keepalived
+              dist: xenial
+            - name: kibana
+              dist: xenial
+            - name: letsencrypt
+              dist: xenial
+            - name: libvirt
+              dist: xenial
+            - name: linux
+              dist: xenial
+            - name: logrotate
+              dist: xenial
+            - name: maas
+              dist: xenial
+            - name: magnum
+              dist: xenial
+            - name: memcached
+              dist: xenial
+            - name: midonet
+              dist: xenial
+            - name: monasca
+              dist: xenial
+            - name: mongodb
+              dist: xenial
+            - name: murano
+              dist: xenial
+            - name: mysql
+              dist: xenial
+            - name: nagios
+              dist: xenial
+            - name: network
+              dist: xenial
+            - name: nfs
+              dist: xenial
+            - name: nginx
+              dist: xenial
+            - name: nodejs
+              dist: xenial
+            - name: ntp
+              dist: xenial
+            - name: opencontrail
+              dist: xenial
+            - name: openssh
+              dist: xenial
+            - name: openvpn
+              dist: xenial
+            - name: openvstorage
+              dist: xenial
+            - name: owncloud
+              dist: xenial
+            - name: postfix
+              dist: xenial
+            - name: postgresql
+              dist: xenial
+            - name: pritunl
+              dist: xenial
+            - name: python
+              dist: xenial
+            - name: rabbitmq
+              dist: xenial
+            - name: reclass
+              dist: xenial
+            - name: redis
+              dist: xenial
+            - name: roundcube
+              dist: xenial
+            - name: rsync
+              dist: xenial
+            - name: rsyslog
+              dist: xenial
+            - name: sahara
+              dist: xenial
+            - name: salt
+              dist: xenial
+            - name: sensu
+              dist: xenial
+            - name: sentry
+              dist: xenial
+            - name: sphinx
+              dist: xenial
+            - name: statsd
+              dist: xenial
+            - name: supervisor
+              dist: xenial
+            - name: taiga
+              dist: xenial
+            - name: varnish
+              dist: xenial
+            - name: zookeeper
+              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"
+              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 ${_param:jenkins_aptly_url}/{{dist}}/ testing salt salt-latest"
+              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}}-salt"
+              OS:
+                type: string
+                default: "ubuntu"
+              DIST:
+                type: string
+                default: "{{dist}}"
+              ARCH:
+                type: string
+                default: "amd64"