Merge "Add Helm repositories to the private Artifactory"
diff --git a/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/cassandra.yml b/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/cassandra.yml
index 938fc7b..41f7e0c 100644
--- a/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/cassandra.yml
+++ b/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/cassandra.yml
@@ -20,4 +20,4 @@
           publisher:
             component: ${_param:mirror_mirantis_openstack_trusty_cassandra_components}
             distributions:
-              - ubuntu-trusty/cassandra/${_param:apt_mk_version}/
\ No newline at end of file
+              - ubuntu-trusty/cassandra/${_param:apt_mk_version}
\ No newline at end of file
diff --git a/docker/swarm/stack/monitoring/alertmanager.yml b/docker/swarm/stack/monitoring/alertmanager.yml
index 662baf4..1f15be5 100644
--- a/docker/swarm/stack/monitoring/alertmanager.yml
+++ b/docker/swarm/stack/monitoring/alertmanager.yml
@@ -1,6 +1,9 @@
 classes:
 - system.prometheus.alertmanager.container
 parameters:
+  _param:
+    alertmanager_external_url: ${_param:cluster_public_host}
+    alertmanager_external_proto: http
   docker:
     client:
       stack:
@@ -34,4 +37,4 @@
                 ALERTMANAGER_BIND_PORT: ${prometheus:alertmanager:bind:port}
                 ALERTMANAGER_BIND_ADDRESS: ${prometheus:alertmanager:bind:address}
                 ALERTMANAGER_DISCOVERY_DOMAIN: 'monitoring_alertmanager'
-                ALERTMANAGER_EXTERNAL_URL: "http://${_param:stacklight_monitor_address}:15011"
+                ALERTMANAGER_EXTERNAL_URL: "${_param:alertmanager_external_proto}://${_param:alertmanager_external_url}:15011"
diff --git a/jenkins/client/approved_scripts.yml b/jenkins/client/approved_scripts.yml
index 8122e8c..634aa0e 100644
--- a/jenkins/client/approved_scripts.yml
+++ b/jenkins/client/approved_scripts.yml
@@ -144,3 +144,4 @@
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods intersect java.util.List java.lang.Iterable
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods reverse java.util.List
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.util.Collection java.lang.String
+        - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods init java.util.List
diff --git a/jenkins/client/job/deploy/update/cloud_update.yml b/jenkins/client/job/deploy/update/cloud_update.yml
index 0480557..3034ea5 100644
--- a/jenkins/client/job/deploy/update/cloud_update.yml
+++ b/jenkins/client/job/deploy/update/cloud_update.yml
@@ -48,6 +48,18 @@
               type: boolean
               default: 'true'
               description: "Stop API services before update"
+            TARGET_KERNEL_UPDATES:
+              type: string
+              default: "cfg,ctl,prx,msg,dbs"
+              description: "Comma separated list of nodes to update kernel if newer version is available (Valid values are cfg,ctl,prx,msg,dbs,log,mon,mtr,ntw,nal,gtw-virtual,cmn,rgw,cid,cmp,kvm,osd,gtw-physical)"
+            TARGET_REBOOT:
+              type: string
+              default: "cfg,ctl,prx,msg,dbs"
+              description: "Comma separated list of nodes to reboot after update or physical machine rollback (Valid values are cfg,ctl,prx,msg,dbs,log,mon,mtr,ntw,nal,gtw-virtual,cmn,rgw,cid,cmp,kvm,osd,gtw-physical)"
+            TARGET_HIGHSTATE:
+              type: string
+              default: "cfg,ctl,prx,msg,dbs"
+              description: "Comma separated list of nodes to run Salt Highstate on after update or physical machine rollback (Valid values are cfg,ctl,prx,msg,dbs,log,mon,mtr,ntw,nal,gtw-virtual,cmn,rgw,cid,cmp,kvm,osd,gtw-physical)"
             TARGET_UPDATES:
               type: string
               default: "cfg,ctl,prx,msg,dbs"
@@ -124,10 +136,6 @@
               type: string
               default: "gtw01*"
               description: "Salt targeted physical or virtual GTW nodes (ex. gtw01*)"
-            REBOOT:
-              type: boolean
-              default: 'false'
-              description: "Reboot nodes after update"
             ROLLBACK_PKG_VERSIONS:
               type: string
               default: ""
diff --git a/jenkins/client/job/git-mirrors/2way.yml b/jenkins/client/job/git-mirrors/2way.yml
index 0546d94..bb6b44b 100644
--- a/jenkins/client/job/git-mirrors/2way.yml
+++ b/jenkins/client/job/git-mirrors/2way.yml
@@ -20,6 +20,10 @@
               source: mcp/mcp-offline-model
               target: Mirantis/mcp-offline-model
               branches: "master"
+            - name: mcp-drivetrain-model
+              source: mcp/mcp-drivetrain-model
+              target: Mirantis/mcp-drivetrain-model
+              branches: "master"
           template:
             description: ${_param:job_description_2way}
             discard:
diff --git a/jenkins/client/job/git-mirrors/downstream/vnf_ondoarding.yml b/jenkins/client/job/git-mirrors/downstream/vnf_ondoarding.yml
new file mode 100644
index 0000000..bb53937
--- /dev/null
+++ b/jenkins/client/job/git-mirrors/downstream/vnf_ondoarding.yml
@@ -0,0 +1,35 @@
+classes:
+  - system.jenkins.client.job.git-mirrors.downstream
+parameters:
+  _param:
+    gerrit_vnf_onboaring_pipelines_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/pipelines"
+    gerrit_vnf_onboaring_nginx_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/nginx-vnf"
+    gerrit_vnf_onboaring_avi_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/avi-loadbalancer"
+    gerrit_vnf_onboaring_metaswitch_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/metaswitch-vsbc"
+    gerrit_vnf_onboaring_platform_tests_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/platform-tests"
+    gerrit_vnf_onboaring_nfv_platform_repo: "https://gerrit.mcp.mirantis.net/vnf-onboarding/nfv-platform"
+    jenkins_git_mirror_downstream_jobs:
+      - name: vnf-pipelines
+        downstream: vnf-onboarding/pipelines
+        upstream: ${_param:gerrit_vnf_onboaring_pipelines_repo}
+        branches: master
+      - name: nginx-vnf
+        downstream: vnf-onboarding/nginx-vnf
+        upstream: ${_param:gerrit_vnf_onboaring_nginx_repo}
+        branches: master
+      - name: avi-loadbalancer
+        downstream: vnf-onboarding/avi-loadbalancer
+        upstream: ${_param:gerrit_vnf_onboaring_avi_repo}
+        branches: master
+      - name: metaswitch-vsbc
+        downstream: vnf-onboarding/metaswitch-vsbc
+        upstream: ${_param:gerrit_vnf_onboaring_metaswitch_repo}
+        branches: master
+      - name: platform-tests
+        downstream: vnf-onboarding/platform-tests
+        upstream: ${_param:gerrit_vnf_onboaring_platform_tests_repo}
+        branches: master
+      - name: nfv-platform
+        downstream: vnf-onboarding/nfv-platform
+        upstream: ${_param:gerrit_vnf_onboaring_nfv_platform_repo}
+        branches: master
\ No newline at end of file
diff --git a/jenkins/client/job/oscore/salt_virtual_models.yml b/jenkins/client/job/oscore/salt_virtual_models.yml
index 911c1ce..17c4aa8 100644
--- a/jenkins/client/job/oscore/salt_virtual_models.yml
+++ b/jenkins/client/job/oscore/salt_virtual_models.yml
@@ -47,6 +47,10 @@
               type: string
               description: Version of formulas for salt-master bootstrap
               default: "nightly"
+            BOOTSTRAP_EXTRA_REPO_PARAMS:
+              type: string
+              default: ""
+              description: "Defines a list of extra repos with parameters, format: repo 1, repo priority 1, repo pin 1; repo 2, repo priority 2, repo pin 2"
             # openstack api
             OPENSTACK_API_URL:
               type: string
diff --git a/jenkins/client/job/oscore/tests.yml b/jenkins/client/job/oscore/tests.yml
index fe9d33c..56ecfe2 100644
--- a/jenkins/client/job/oscore/tests.yml
+++ b/jenkins/client/job/oscore/tests.yml
@@ -598,6 +598,14 @@
                 type: boolean
                 default: "{{auto_promote}}"
                 description: Enable to autopromote repo
+              TEST_MULTINODE:
+                type: boolean
+                default: "{{test_multinode}}"
+                description: Whether to test nightly snapshot against multi-node virtual models
+              STACK_CLUSTER_NAMES:
+                type: string
+                default: "{{stack_cluster_names}}"
+                description: "Cluster name to use from reclass to deploy multi-node"
         build-salt-formula-refspec-template:
           name: "{{job_prefix}}-build-salt-formula-refspec"
           template:
@@ -688,7 +696,7 @@
             trigger:
               gerrit:
                 project:
-                  "^salt-formulas/(nova|cinder|glance|keystone|horizon|neutron|designate|heat|ironic|barbican|aodh|ceilometer|gnocchi|panko|manila|salt|linux|reclass|galera|memcached|rabbitmq|bind|apache)$":
+                  "^salt-formulas/(nova|cinder|glance|keystone|horizon|neutron|designate|heat|ironic|barbican|aodh|ceilometer|gnocchi|panko|manila|salt|linux|reclass|galera|memcached|rabbitmq|bind|apache|runtest)$":
                     compare_type: 'REG_EXP'
                     branches:
                       - master
diff --git a/jenkins/client/job/validate.yml b/jenkins/client/job/validate.yml
index 168dcfd..c97c0ad 100644
--- a/jenkins/client/job/validate.yml
+++ b/jenkins/client/job/validate.yml
@@ -364,3 +364,43 @@
             PROXY:
               type: string
               default: ""
+        cvp-stacklight:
+          type: workflow-scm
+          name: cvp-stacklight
+          display_name: "CVP - Stacklight tests"
+          discard:
+            build:
+              keep_num: 20
+            artifact:
+              keep_num: 20
+          concurrent: false
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            branch: "${_param:jenkins_pipelines_branch}"
+            credentials: "gerrit"
+            script: cvp-runner.groovy
+          param:
+            SALT_MASTER_URL:
+              type: string
+              default: "${_param:jenkins_salt_api_url}"
+              description: Full Salt API address [e.g. https://10.10.10.2:6969]
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              default: "salt"
+            TESTS_REPO:
+              type: string
+              default: "https://github.com/legan4ik/stacklight-pytest"
+              description: Url for cvp-stacklight-tests
+            TESTS_SETTINGS:
+              type: string
+              default: "SL_AUTOCONF=True"
+              description: "Additional environment variables to export"
+            TESTS_SET:
+              type: string
+              default: "stacklight-pytest/stacklight_tests/tests/prometheus/"
+              description: "Leave empty for full run or choose a file, e.g. test_dashboards.py"
+            PROXY:
+              type: string
+              default: ""
+              description: Proxy address to clone repo and install python requirements
diff --git a/jenkins/client/job/vnf-onboarding/init.yml b/jenkins/client/job/vnf-onboarding/init.yml
index 19ba3f6..0e0a847 100644
--- a/jenkins/client/job/vnf-onboarding/init.yml
+++ b/jenkins/client/job/vnf-onboarding/init.yml
@@ -11,3 +11,5 @@
     vnf_openstack_api_credentials: "test-openstack"
     vnf_elastic_url: "${_param:stacklight_log_address}:${_param:cluster_elasticsearch_port}"
     vnf_docker_registry_path: "docker-dev-local.docker.mirantis.net/mirantis/vnf-onboarding"
+    vnf_artifactory_url: "https://artifactory.mcp.mirantis.net/artifactory/vnf-onboarding-sandbox"
+    contrail_api_url: "http://127.0.0.1:8082"
diff --git a/jenkins/client/job/vnf-onboarding/test_avi_loadbalancer.yml b/jenkins/client/job/vnf-onboarding/test_avi_loadbalancer.yml
index f30b2b7..2bc206b 100644
--- a/jenkins/client/job/vnf-onboarding/test_avi_loadbalancer.yml
+++ b/jenkins/client/job/vnf-onboarding/test_avi_loadbalancer.yml
@@ -73,9 +73,40 @@
             NFV_PLATFORM_REPO_CREDENTIALS:
               type: string
               default: "${_param:vnf_gerrit_credentials}"
+            CONTRAIL_ENABLED:
+              type: boolean
+              default: false
+            CONTRAIL_API_URL:
+              type: string
+              default: "${_param:contrail_api_url}"
             CI_OPTIONS:
               type: string
               default: "CFY_AGENT_NET=cfm-net CFY_AGENT_FLAVOR=cfy.agent CFY_AGENT_IMAGE=ubuntu1 CFY_AGENT_USER=cfyuser CFY_SG=cfm-sg CFY_SSH_KEY_ID=openstack_key"
+            VNF_ARTIFACTORY_URL:
+              type: string
+              default: "${_param:vnf_artifactory_url}"
+            VNF_ARTIFACTORY_PLUGINS_DIR:
+              type: string
+              default: "${_param:vnf_artifactory_url}/cloudify/plugins/"
+            VNF_DOCKER_REGISTRY_PATH:
+              type: string
+              default: "${_param:vnf_docker_registry_path}"
+            VNF_DOCKER_CLI_TAG:
+              type: string
+              default: "latest"
+            VNF_DOCKER_SCRUN_TAG:
+              type: string
+              default: "latest"
+            VNF_DOCKER_AVICFG_TAG:
+              type: string
+              default: "latest"
+            VNF_PLUGINS:
+              type: string
+              description: "Plugins to fetch from artifactory and install during build package step"
+              default: "vnf_onboarding_tools-0.1-py27-none-linux_x86_64_Ubuntu_xenial"
             VNF_OPTIONS:
               type: string
               default: "AVI_VERSION=17.2.3 AVI_USERNAME=admin AVI_PASSWORD=Swordfish1234 AVI_IMAGE_PASSWORD=58NFaGDJm(PJH0G AVI_OS_FLAVOR=avi_ctrl.small AVI_OS_IMAGE=avi-control-17.2.3"
+            VNF_DOCKER_CLI_PLATFORM:
+              type: string
+              default: "ubuntu"
diff --git a/jenkins/client/job/vnf-onboarding/test_nginx_vnf.yml b/jenkins/client/job/vnf-onboarding/test_nginx_vnf.yml
index 8a86363..2dc1a31 100644
--- a/jenkins/client/job/vnf-onboarding/test_nginx_vnf.yml
+++ b/jenkins/client/job/vnf-onboarding/test_nginx_vnf.yml
@@ -74,9 +74,37 @@
             NFV_PLATFORM_REPO_CREDENTIALS:
               type: string
               default: "${_param:vnf_gerrit_credentials}"
+            CONTRAIL_ENABLED:
+              type: boolean
+              default: false
+            CONTRAIL_API_URL:
+              type: string
+              default: "${_param:contrail_api_url}"
             CI_OPTIONS:
               type: string
               default: "CFY_AGENT_NET=cfm-net CFY_AGENT_FLAVOR=cfy.agent CFY_AGENT_IMAGE=ubuntu1 CFY_AGENT_USER=cfyuser CFY_SG=cfm-sg CFY_SSH_KEY_ID=openstack_key"
+            VNF_ARTIFACTORY_URL:
+              type: string
+              default: "${_param:vnf_artifactory_url}"
+            VNF_ARTIFACTORY_PLUGINS_DIR:
+              type: string
+              default: "${_param:vnf_artifactory_url}/cloudify/plugins/"
+            VNF_DOCKER_REGISTRY_PATH:
+              type: string
+              default: "${_param:vnf_docker_registry_path}"
+            VNF_DOCKER_CLI_TAG:
+              type: string
+              default: "latest"
+            VNF_DOCKER_SCRUN_TAG:
+              type: string
+              default: "latest"
+            VNF_PLUGINS:
+              type: string
+              description: "Plugins to fetch from artifactory and install during build package step"
+              default: "vnf_onboarding_tools-0.1-py27-none-linux_x86_64_Ubuntu_xenial"
             VNF_OPTIONS:
               type: string
               default: ""
+            VNF_DOCKER_CLI_PLATFORM:
+              type: string
+              default: "ubuntu"
diff --git a/jenkins/slave/docker.yml b/jenkins/slave/docker.yml
index ea3639b..227dd51 100644
--- a/jenkins/slave/docker.yml
+++ b/jenkins/slave/docker.yml
@@ -15,4 +15,7 @@
             hosts:
             - ALL
             commands:
-            - /usr/bin/docker
\ No newline at end of file
+            - /usr/bin/docker
+      package:
+        docker-ce:
+          version: latest
diff --git a/jenkins/slave/python.yml b/jenkins/slave/python.yml
new file mode 100644
index 0000000..d53caf2
--- /dev/null
+++ b/jenkins/slave/python.yml
@@ -0,0 +1,10 @@
+ classes:
+   - system.jenkins.slave
+ parameters:
+   linux:
+     system:
+       package:
+         python:
+           version: latest
+         python-virtualenv:
+           version: latest
diff --git a/prometheus/alertmanager/notification/email.yml b/prometheus/alertmanager/notification/email.yml
index 02b44ff..4daec23 100644
--- a/prometheus/alertmanager/notification/email.yml
+++ b/prometheus/alertmanager/notification/email.yml
@@ -1,6 +1,7 @@
 parameters:
   prometheus:
     alertmanager:
+      enabled: true
       config:
         route:
           routes:
@@ -9,6 +10,7 @@
               match_re:
                 - label: route
                   value: email
+              continue: true
         receiver:
           SMTP:
             enabled: true
diff --git a/prometheus/alertmanager/notification/pushkin.yml b/prometheus/alertmanager/notification/pushkin.yml
index a78b6fd..151801b 100644
--- a/prometheus/alertmanager/notification/pushkin.yml
+++ b/prometheus/alertmanager/notification/pushkin.yml
@@ -1,10 +1,10 @@
 parameters:
-    _param:
-      alertmanager_notification_pushkin_host: ${_param:haproxy_pushkin_bind_host}
-      alertmanager_notification_pushkin_port: ${_param:haproxy_pushkin_bind_port}
-parameters:
+  _param:
+    alertmanager_notification_pushkin_host: ${_param:haproxy_pushkin_bind_host}
+    alertmanager_notification_pushkin_port: ${_param:haproxy_pushkin_bind_port}
   prometheus:
     alertmanager:
+      enabled: true
       config:
         route:
           routes:
diff --git a/prometheus/alertmanager/notification/slack.yml b/prometheus/alertmanager/notification/slack.yml
index 2158adb..412e91f 100644
--- a/prometheus/alertmanager/notification/slack.yml
+++ b/prometheus/alertmanager/notification/slack.yml
@@ -1,11 +1,13 @@
 parameters:
   prometheus:
     alertmanager:
+      enabled: true
       config:
         route:
           routes:
             slack:
               receiver: HTTP-slack
+              continue: true
         receiver:
           HTTP-slack:
             enabled: true