X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-macros.yaml;h=46ccd1269ec7953ef89c23950cecb8aebb20e8c9;hb=1870dba1bee464eeb248bdeef87b40103a86b044;hp=b4365356428fbebc67a5d10c4b871dcf0b2716e5;hpb=f1086a217eef88423ddcd60186df5055a43e39a9;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml index b43653564..46ccd1269 100644 --- a/jjb/integration/integration-macros.yaml +++ b/jjb/integration/integration-macros.yaml @@ -285,7 +285,7 @@ - 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' @@ -304,12 +304,22 @@ 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