Merge "Use only functest-{testsuite}-builder for the installer daily job builder"
authorMorgan Richomme <morgan.richomme@orange.com>
Fri, 22 Apr 2016 06:45:47 +0000 (06:45 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 22 Apr 2016 06:45:47 +0000 (06:45 +0000)
jjb/apex/apex.yml
jjb/functest/functest-ci-jobs.yml

index 0356dda..1296b5b 100644 (file)
             set -o pipefail
 
             # delete everything that is in $WORKSPACE
-            /bin/rm -rf $WORKSPACE
+            sudo /bin/rm -rf $WORKSPACE
 
 - builder:
     name: 'apex-upload-artifact'
index b7a75e8..a0a1326 100644 (file)
                 fi
                 INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
                 sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
-                sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
-                sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+                if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+                    sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+                fi
+                if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+                    sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+                fi
             elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
                 # If production lab then creds may be retrieved dynamically
                 # creds are on the jumphost, always in the same folder