Merge "clean opnfv/opnfv-docs.yml"
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 26 Jul 2016 04:29:38 +0000 (04:29 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 26 Jul 2016 04:29:39 +0000 (04:29 +0000)
jjb/fuel/fuel-upload-artifact.sh
jjb/functest/set-functest-env.sh
jjb/joid/joid-ci-jobs.yml
utils/fetch_os_creds.sh
utils/retention_script.sh

index 47cf898..1ccd328 100755 (executable)
@@ -19,6 +19,7 @@ fi
 # source the opnfv.properties to get ARTIFACT_VERSION
 source $WORKSPACE/opnfv.properties
 
+nfsstore () {
 # storing ISOs for verify & merge jobs will be done once we get the disk array
 if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
     # store ISO locally on NFS first
@@ -34,7 +35,30 @@ if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
             $ISOSTORE/opnfv-$OPNFV_ARTIFACT_VERSION.iso
     fi
 fi
+}
 
+importkey () {
+# clone releng repository
+echo "Cloning releng repository..."
+[ -d releng ] && rm -rf releng
+git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
+#this is where we import the siging key
+if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
+  source $WORKSPACE/releng/utils/gpg_import_key.sh
+fi
+}
+
+signiso () {
+gpg2 -vvv --batch --yes --no-tty \
+  --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
+  --passphrase besteffort \
+  --detach-sig $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso
+
+gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig
+echo "ISO signature Upload Complete!"
+}
+
+uploadiso () {
 # log info to console
 echo "Uploading $INSTALLER_TYPE artifact. This could take some time..."
 echo
@@ -80,3 +104,17 @@ echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
 echo
 echo "--------------------------------------------------------"
 echo
+}
+
+nfsstore
+
+if [[ ! "$JOB_NAME" =~ merge ]]; then
+    importkey
+    signiso
+    uploadiso
+fi
+
+if [[ ! "$JOB_NAME" =~ verify ]]; then
+    uploadiso
+fi
+
index d2e232d..b7d745a 100755 (executable)
@@ -41,10 +41,13 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR
     sudo iptables -I FORWARD -j RETURN
 fi
 
+DEPLOY_TYPE=baremetal
+[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt
+
 echo "Functest: Start Docker and prepare environment"
 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
     -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
-    -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG}"
+    -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}"
 branch=${GIT_BRANCH##*/}
 dir_result="${HOME}/opnfv/functest/results/${branch}"
 mkdir -p ${dir_result}
index 61c1f82..ae03eab 100644 (file)
@@ -70,7 +70,7 @@
         - 'os-onos-nofeature-noha':
             auto-trigger-name: 'daily-trigger-disabled'
         - 'os-onos-sfc-ha':
-            auto-trigger-name: 'daily-trigger-disabled'
+            auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
         - 'os-ocl-nofeature-ha':
             auto-trigger-name: 'daily-trigger-disabled'
         - 'os-ocl-nofeature-noha':
 - trigger:
     name: 'joid-os-onos-sfc-ha-baremetal-master-trigger'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: '0 22 * * *'
+- trigger:
+    name: 'joid-os-onos-sfc-ha-virtual-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger'
+    triggers:
+        - timed: ''
 
 # os-onos-nofeature-ha trigger - branch: stable/brahmaputra
 - trigger:
     name: 'joid-os-onos-nofeature-ha-juniper-pod1-brahmaputra-trigger'
     triggers:
         - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-baremetal-brahmaputra-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-virtual-brahmaputra-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-orange-pod2-brahmaputra-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-onos-sfc-ha-juniper-pod1-brahmaputra-trigger'
+    triggers:
+        - timed: ''
 
 # os-nosdn-lxd-noha trigger - branch: master
 - trigger:
index c240976..34c81af 100755 (executable)
@@ -80,9 +80,16 @@ if [ "$installer_type" == "fuel" ]; then
     #ip_fuel="10.20.0.2"
     verify_connectivity $installer_ip
 
+    env=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
+        'fuel env'|grep operational|tail -1|awk '{print $1}') &> /dev/null
+    if [ -z $env ]; then
+        error "No operational environment detected in Fuel"
+    fi
+    env_id="${FUEL_ENV:-$env}"
+
     # Check if controller is alive (online='True')
     controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
-        'fuel node | grep controller | grep "True\|  1" | awk -F\| "{print \$5}" | tail -1' | \
+        'fuel node --env ${env_id} | grep controller | grep "True\|  1" | awk -F\| "{print \$5}" | tail -1' | \
         sed 's/ //g') &> /dev/null
 
     if [ -z $controller_ip ]; then
index 7e50623..b217793 100755 (executable)
@@ -22,6 +22,7 @@ for x in armband ovsnfv fuel apex compass4nfv
 do
 
   echo "Looking at artifacts for project $x"
+  echo "In path gs://artifacts.opnfv.org/$x"
 
   while IFS= read -r artifact; do
 
@@ -31,6 +32,7 @@ do
 
     if [[ "$daysold" -gt "10" ]]; then
       echo "$daysold Days old deleting: $(basename $artifact)"
+      gsutil rm "$artifact"
     else
       echo "$daysold Days old retaining: $(basename $artifact)"
     fi