Fix the missing whitespace for the list of pids
[releng/builder.git] / jjb / integration / integration-macros.yaml
index 4f3e698515bbe25bff15487054af5378fd8ed7d8..da2da40d0d2431ee6c255f937359f6c1cba09287 100644 (file)
     triggers:
         - timed: 'H H * * *'
 
+# Macro: integration-jclouds-controller-mininet
+# Operation: this macro will spin the controller and mininet vms
+# Used by: {project}-csit-* job templates
+
+- wrapper:
+    name: integration-jclouds-controller-mininet
+    wrappers:
+      - jclouds:
+          instances:
+            - '{controller-image}':
+                cloud-name: 'ODLPUB'
+                count: '{controller-vms}'
+            - '{mininet-image}':
+                cloud-name: 'ODLPUB'
+                count: '{mininet-vms}'
+
 # Macro: integration-openstack-controller-mininet
 # Operation: this macro will spin the controller and mininet vms
 # Used by: {project}-csit-* job templates
               template-name: '{mininet-image}'
               count: '{mininet-vms}'
 
+# Macro: integration-jclouds-controller-devstack
+# Operation: this macro will spin the controller and devstack vms
+# Used by: {project}-csit-openstack job templates
+- wrapper:
+    name: integration-jclouds-controller-devstack
+    wrappers:
+      - jclouds:
+          instances:
+            - '{controller-image}':
+                cloud-name: 'ODLPUB'
+                count: '{controller-vms}'
+            - '{openstack-image}':
+                cloud-name: 'ODLPUB'
+                count: '{openstack-vms}'
+
 # Macro: integration-openstack-controller-devstack
 # Operation: this macro will spin the controller and devstack vms
 # Used by: {project}-csit-openstack job templates
         - shell: |
             #!/bin/bash
             function copy-ssh-keys-to-slave() {
-                RETRIES=30
+                RETRIES=60
                 for j in $(seq 1 $RETRIES); do
                     if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then
                         ssh jenkins@${i} 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts'
             echo "OpenStack IPS are ${JCLOUDS_IPS}"
 
             IFS=',' read -ra ADDR <<< "${JCLOUDS_IPS}"
-
+            pids=""
             for i in "${ADDR[@]}"; do
-                copy-ssh-keys-to-slave &
+                ( copy-ssh-keys-to-slave ) &
+                # Store PID of process
+                pids+=" $!"
             done
 
-            wait
+            # Detect when a process failed to copy ssh keys and fail build
+            for p in $pids; do
+                if wait $p; then
+                    echo "Process $p successfully copied ssh keys."
+                else
+                    echo "Process $p failed to copy ssh keys."
+                    exit 1
+                fi
+            done
             echo "Copying ssh keys complete."
 
 # Macro: integration-get-slave-addresses
             !include-raw:
                 - include-raw-integration-deploy-controller-run-test.sh
 
-# Macro: include-raw-integration-deploy-robot-testing
-# Operation: this macro only resolves suite path from testplan
-# Used by: {project}-openstack-{functionality}-daily-{openstack}-{odl} job templates
-
-- builder:
-    name: include-raw-integration-deploy-devstack-testing
-    builders:
-        - shell:
-            !include-raw:
-                - include-raw-integration-deploy-devstack-testing.sh
-
 # Macro: integration-configure-clustering
 # Operation: this macro configures the clustering
 # Used by: {project}-csit-3node-* job templates
             pass-threshold: '{pass-if}'
             only-critical: false
 
+- publisher:
+    name: integration-robot-tempest
+    publishers:
+        - robot:
+            output-path: ''
+            other-files:
+                - tempest_results.html
+            unstable-threshold: '{unstable-if}'
+            pass-threshold: '{pass-if}'
+            only-critical: false
+
 - publisher:
     name: integration-csit-archive-build
     publishers:
                     mkdir $WORKSPACE/archives
                     curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
                     unzip -d $WORKSPACE/archives robot-plugin.zip
-                    mv *log* *.log *.csv $WORKSPACE/archives || true  # Don't fail if file missing
+                    mv *log* *.log *.csv *.png $WORKSPACE/archives || true  # Don't fail if file missing
             script-only-if-succeeded: False
             script-only-if-failed: False
             mark-unstable-if-failed: True