Apex,3rd_party: Fix workspace wiping 51/28451/1
authorTim Rozet <trozet@redhat.com>
Fri, 10 Feb 2017 16:36:50 +0000 (11:36 -0500)
committerTim Rozet <trozet@redhat.com>
Fri, 10 Feb 2017 16:36:50 +0000 (11:36 -0500)
Workspace wiping was done in builders, which can be removed in favor of
wiping workspace via the 'scm' entry in the job.  For now we point at
apex since we require apex repo to clean the host properly.  We also
need sdnvpn for the python code to upgrade ODL.  Since we can only use a
single scm at a time, we use apex in the jjb, and then manually clone
sdnvpn in the builders that require it.

Change-Id: I52274fc8fdd6b6c052e396c2a63dab5abcbf764e
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/3rd_party_ci/create-apex-vms.sh
jjb/3rd_party_ci/download-netvirt-artifact.sh
jjb/3rd_party_ci/install-netvirt.sh
jjb/3rd_party_ci/odl-netvirt.yml
jjb/3rd_party_ci/postprocess-netvirt.sh
jjb/apex/apex-snapshot-deploy.sh

index 3f5dbd1..0744ac8 100755 (executable)
@@ -1,12 +1,8 @@
 #!/bin/bash
-set -e
+set -o errexit
+set -o nounset
+set -o pipefail
 
-if [ -z ${WORKSPACE} ]; then
-  echo "WORKSPACE is unset. Please do so."
-  exit 1
-fi
-# wipe the WORKSPACE
-/bin/rm -rf $WORKSPACE/*
 # clone opnfv sdnvpn repo
 git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn
 
index be2d405..fe8066c 100755 (executable)
@@ -1,12 +1,7 @@
 #!/bin/bash
-set -e
-
-if [ -z ${WORKSPACE} ]; then
-  echo "WORKSPACE is unset. Please do so."
-  exit 1
-fi
-# wipe the WORKSPACE
-/bin/rm -rf $WORKSPACE/*
+set -o errexit
+set -o nounset
+set -o pipefail
 
 echo "Attempting to fetch the artifact location from ODL Jenkins"
 CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~master~$GERRIT_CHANGE_ID/detail"
index c9aa4c5..ce2a50c 100755 (executable)
@@ -1,12 +1,4 @@
 #!/bin/bash
-set -e
-
-if [ -z ${WORKSPACE} ]; then
-  echo "WORKSPACE is unset. Please set."
-  exit 1
-fi
-# wipe the WORKSPACE
-/bin/rm -rf $WORKSPACE/*
 set -o errexit
 set -o nounset
 set -o pipefail
index 5900588..f3a4c02 100644 (file)
             max-per-node: 1
             option: 'project'
 
+    scm:
+        - git:
+            url: https://gerrit.opnfv.org/gerrit/apex
+            branches:
+                - 'origin/master'
+            timeout: 15
+            wipe-workspace: true
+
     parameters:
         - project-parameter:
             project: '{project}'
             timeout: 360
             fail: true
 
+    scm:
+        - git:
+            url: https://gerrit.opnfv.org/gerrit/apex
+            branches:
+                - 'origin/master'
+            timeout: 15
+            wipe-workspace: true
+
     parameters:
         - project-parameter:
             project: '{project}'
index 5baf378..7965142 100755 (executable)
@@ -1,12 +1,8 @@
 #!/bin/bash
-set -e
+set -o errexit
+set -o nounset
+set -o pipefail
 
-if [ -z ${WORKSPACE} ]; then
-  echo "WORKSPACE is unset. Please do so."
-  exit 1
-fi
-# wipe the WORKSPACE
-/bin/rm -rf $WORKSPACE/*
 # clone opnfv sdnvpn repo
 git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn
 . $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh
index 3bb65a0..a99955f 100644 (file)
@@ -21,8 +21,7 @@ echo "--------------------------"
 echo
 
 echo "Cleaning server"
-git clone https://gerrit.opnfv.org/gerrit/apex.git
-pushd apex/ci > /dev/null
+pushd ci > /dev/null
 sudo CONFIG=../build/ LIB=../lib ./clean.sh
 popd > /dev/null