engine: Skip artifact download in test jobs in offline mode

Change-Id: I869ea5997658598eaad4d65e30373543d2d20215
diff --git a/jjb/cloud-infra/engine-jobs/engine-verify-deploy-test.yaml b/jjb/cloud-infra/engine-jobs/engine-verify-deploy-test.yaml
index 4daf2ef..164c679 100644
--- a/jjb/cloud-infra/engine-jobs/engine-verify-deploy-test.yaml
+++ b/jjb/cloud-infra/engine-jobs/engine-verify-deploy-test.yaml
@@ -333,5 +333,5 @@
     builders:
       - 'generate-ssh-keypair-macro'
       - 'wait-pkg-mgr-macro'
-      - 'download-artifact-macro'
+      - 'download-{phase}-artifact-macro'
       - '{phase}-macro'
diff --git a/jjb/cloud-infra/engine-macros.yaml b/jjb/cloud-infra/engine-macros.yaml
index 32d44e0..9fe9404 100644
--- a/jjb/cloud-infra/engine-macros.yaml
+++ b/jjb/cloud-infra/engine-macros.yaml
@@ -52,10 +52,22 @@
           !include-raw: ./scripts/upload-artifact.sh
 
 - builder:
-    name: 'download-artifact-macro'
+    name: 'download-deploy-artifact-macro'
     builders:
       - shell:
-          !include-raw: ./scripts/download-artifact.sh
+          !include-raw: ./scripts/download-deploy-artifact.sh
+
+- builder:
+    name: 'download-functest-artifact-macro'
+    builders:
+      - shell:
+          !include-raw: ./scripts/download-functest-artifact.sh
+
+- builder:
+    name: 'download-yardstick-artifact-macro'
+    builders:
+      - shell:
+          !include-raw: ./scripts/download-yardstick-artifact.sh
 
 - builder:
     name: 'deploy-macro'
diff --git a/jjb/cloud-infra/ironic-jobs/ironic-release-jobs.yaml b/jjb/cloud-infra/ironic-jobs/ironic-release-jobs.yaml
index 98370e9..0be5d00 100644
--- a/jjb/cloud-infra/ironic-jobs/ironic-release-jobs.yaml
+++ b/jjb/cloud-infra/ironic-jobs/ironic-release-jobs.yaml
@@ -57,7 +57,7 @@
 
     disabled: '{obj:disabled}'
 
-    node: 'engine-package-{distro}-fra'
+    node: 'engine-package-ubuntu1804-fra'
 
     concurrent: false
 
@@ -323,7 +323,7 @@
     builders:
       - description-setter:
           description: provisioning
-      - 'download-artifact-macro'
+      - 'download-deploy-artifact-macro'
       - 'deploy-macro'
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/cloud-infra/ironic-jobs/ironic-verify-package.yaml b/jjb/cloud-infra/ironic-jobs/ironic-verify-package.yaml
index bb2997c..bcb6a0d 100644
--- a/jjb/cloud-infra/ironic-jobs/ironic-verify-package.yaml
+++ b/jjb/cloud-infra/ironic-jobs/ironic-verify-package.yaml
@@ -49,7 +49,7 @@
 
     disabled: '{obj:disabled}'
 
-    node: 'engine-package-{distro}-fra'
+    node: 'engine-package-ubuntu1804-fra'
 
     concurrent: true
 
diff --git a/jjb/cloud-infra/ironic-jobs/ironic-verify-provision.yaml b/jjb/cloud-infra/ironic-jobs/ironic-verify-provision.yaml
index 0522db2..84ee3eb 100644
--- a/jjb/cloud-infra/ironic-jobs/ironic-verify-provision.yaml
+++ b/jjb/cloud-infra/ironic-jobs/ironic-verify-provision.yaml
@@ -86,7 +86,7 @@
           description: 'Distribution to use for configuring target nodes (networking etc.)'
       - label:
           name: SLAVE_LABEL
-          default: 'engine-{slave-type}-{environment-type}-{distro}-fra'
+          default: 'engine-{slave-type}-{environment-type}-ubuntu1804-fra'
           description: 'Slave label to schedule this job on.'
       - string:
           name: HW_TYPE
@@ -250,7 +250,7 @@
       - inject:
           properties-file: "$WORKSPACE/change.properties"
       - 'generate-ssh-keypair-macro'
-      - 'download-artifact-macro'
+      - 'download-deploy-artifact-macro'
       - 'wait-pkg-mgr-macro'
       - 'deploy-macro'
 
diff --git a/jjb/cloud-infra/kubernetes-jobs/kubernetes-release-deploy-test.yaml b/jjb/cloud-infra/kubernetes-jobs/kubernetes-release-deploy-test.yaml
index f75b997..4ef9f6f 100644
--- a/jjb/cloud-infra/kubernetes-jobs/kubernetes-release-deploy-test.yaml
+++ b/jjb/cloud-infra/kubernetes-jobs/kubernetes-release-deploy-test.yaml
@@ -137,7 +137,7 @@
     builders:
       - description-setter:
           description: $DEPLOY_SCENARIO
-      - 'download-artifact-macro'
+      - 'download-deploy-artifact-macro'
       - multijob:
           name: "Offline Deployment on Baremetal using {deploy-scenario}"
           condition: SUCCESSFUL
diff --git a/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml b/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml
index 82626e2..94318bc 100644
--- a/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml
+++ b/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml
@@ -348,5 +348,5 @@
     builders:
       - 'generate-ssh-keypair-macro'
       - 'wait-pkg-mgr-macro'
-      - 'download-artifact-macro'
+      - 'download-{phase}-artifact-macro'
       - '{phase}-macro'
diff --git a/jjb/cloud-infra/onap-jobs/onap-verify-deploy-test.yaml b/jjb/cloud-infra/onap-jobs/onap-verify-deploy-test.yaml
index 610fb63..167bc76 100644
--- a/jjb/cloud-infra/onap-jobs/onap-verify-deploy-test.yaml
+++ b/jjb/cloud-infra/onap-jobs/onap-verify-deploy-test.yaml
@@ -333,5 +333,5 @@
     builders:
       - 'generate-ssh-keypair-macro'
       - 'wait-pkg-mgr-macro'
-      - 'download-artifact-macro'
+      - 'download-{phase}-artifact-macro'
       - '{phase}-macro'
diff --git a/jjb/cloud-infra/openstack-jobs/openstack-release-deploy-test.yaml b/jjb/cloud-infra/openstack-jobs/openstack-release-deploy-test.yaml
index b9e329c..08792ec 100644
--- a/jjb/cloud-infra/openstack-jobs/openstack-release-deploy-test.yaml
+++ b/jjb/cloud-infra/openstack-jobs/openstack-release-deploy-test.yaml
@@ -128,7 +128,7 @@
     builders:
       - description-setter:
           description: $DEPLOY_SCENARIO
-      - 'download-artifact-macro'
+      - 'download-deploy-artifact-macro'
       - multijob:
           name: "Offline Deployment on Baremetal using {deploy-scenario}"
           condition: SUCCESSFUL
diff --git a/jjb/cloud-infra/openstack-jobs/openstack-verify-deploy-test.yaml b/jjb/cloud-infra/openstack-jobs/openstack-verify-deploy-test.yaml
index deab833..2ac2c5b 100644
--- a/jjb/cloud-infra/openstack-jobs/openstack-verify-deploy-test.yaml
+++ b/jjb/cloud-infra/openstack-jobs/openstack-verify-deploy-test.yaml
@@ -330,5 +330,5 @@
     builders:
       - 'generate-ssh-keypair-macro'
       - 'wait-pkg-mgr-macro'
-      - 'download-artifact-macro'
+      - 'download-{phase}-artifact-macro'
       - '{phase}-macro'
diff --git a/jjb/cloud-infra/scripts/download-artifact.sh b/jjb/cloud-infra/scripts/download-deploy-artifact.sh
similarity index 100%
rename from jjb/cloud-infra/scripts/download-artifact.sh
rename to jjb/cloud-infra/scripts/download-deploy-artifact.sh
diff --git a/jjb/cloud-infra/scripts/download-functest-artifact.sh b/jjb/cloud-infra/scripts/download-functest-artifact.sh
new file mode 100755
index 0000000..24d266a
--- /dev/null
+++ b/jjb/cloud-infra/scripts/download-functest-artifact.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o nounset
+set -o errexit
+
+echo "Info  : Testing of offline deployments is not currently supported! Skipping artifact download"
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/cloud-infra/scripts/download-yardstick-artifact.sh b/jjb/cloud-infra/scripts/download-yardstick-artifact.sh
new file mode 120000
index 0000000..9d2c82e
--- /dev/null
+++ b/jjb/cloud-infra/scripts/download-yardstick-artifact.sh
@@ -0,0 +1 @@
+download-functest-artifact.sh
\ No newline at end of file