Merge "Enable delete for artifact retention script"
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 25 Jul 2016 20:43:49 +0000 (20:43 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Mon, 25 Jul 2016 20:43:49 +0000 (20:43 +0000)
jjb/apex/apex.yml
jjb/compass4nfv/compass-deploy.sh
jjb/fuel/fuel-upload-artifact.sh
jjb/functest/functest-ci-jobs.yml
jjb/functest/set-functest-env.sh
jjb/joid/joid-ci-jobs.yml
jjb/opnfv/opnfv-lint.yml
jjb/releng-macros.yaml
jjb/releng/releng-ci-jobs.yml
utils/fetch_os_creds.sh
utils/push-test-logs.sh

index 8f9f49e..f380233 100644 (file)
@@ -4,6 +4,7 @@
         - 'apex-verify-{stream1}'
         - 'apex-verify-{stream2}'
         - 'apex-runner-{platform}-{scenario}-{stream}'
+        - 'apex-runner-cperf-{stream1}'
         - 'apex-build-{stream}'
         - 'apex-deploy-virtual-{scenario}-{stream}'
         - 'apex-deploy-baremetal-{scenario}-{stream}'
@@ -58,6 +59,7 @@
          - 'os-odl_l2-sfc-noha'
          - 'os-odl_l3-nofeature-ha'
          - 'os-onos-nofeature-ha'
+         - 'os-onos-sfc-ha'
          - 'os-ocl-nofeature-ha'
 
     platform:
                 build-step-failure-threshold: 'never'
                 failure-threshold: 'never'
                 unstable-threshold: 'FAILURE'
+        - trigger-builds:
+          - project: 'apex-deploy-baremetal-os-odl_l2-bgpvpn-ha-{stream1}'
+            predefined-parameters: |
+              BUILD_DIRECTORY=apex-build-{stream1}/build
+              OPNFV_CLEAN=yes
+            git-revision: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+            block: true
+        - trigger-builds:
+          - project: 'functest-apex-{daily-slave}-daily-{stream1}'
+            predefined-parameters:
+              DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
+            block: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
+        - trigger-builds:
+          - project: 'yardstick-apex-{slave}-daily-{stream1}'
+            predefined-parameters:
+              DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
+            block: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
+        - trigger-builds:
+          - project: 'apex-deploy-baremetal-os-onos-sfc-ha-{stream1}'
+            predefined-parameters: |
+              BUILD_DIRECTORY=apex-build-{stream1}/build
+              OPNFV_CLEAN=yes
+            git-revision: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+            block: true
+        - trigger-builds:
+          - project: 'functest-apex-{daily-slave}-daily-{stream1}'
+            predefined-parameters:
+              DEPLOY_SCENARIO=os-onos-sfc-ha
+            block: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
+        - trigger-builds:
+          - project: 'yardstick-apex-{slave}-daily-{stream1}'
+            predefined-parameters:
+              DEPLOY_SCENARIO=os-onos-sfc-ha
+            block: true
+            same-node: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
 
 - job-template:
     name: 'apex-gs-clean-{stream}'
index c70a4ec..d713164 100644 (file)
@@ -61,6 +61,6 @@ echo "--------------------------------------------------------"
 echo "Done!"
 
 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
-sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./  &> /dev/null
+sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${OPENSTACK_VERSION}-opnfv2/ansible.log ./  &> /dev/null
 
 exit $deploy_ret
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 28ea643..6a571ab 100644 (file)
 #--------------------------------
 
     testsuite:
-        - 'daily'
-        - 'weekly'
-        - 'suite'
+        - 'suite':
+            job-timeout: 60
+        - 'daily':
+            job-timeout: 120
+        - 'weekly':
+            job-timeout: 400
 
     jobs:
         - 'functest-{installer}-{pod}-{testsuite}-{stream}'
         - build-name:
             name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
         - timeout:
-            timeout: 400
+            timeout: '{job-timeout}'
             abort: true
 
     parameters:
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 4f3f7ac..9611a38 100644 (file)
@@ -51,7 +51,7 @@
                     comment-contains-value: 'reverify'
             projects:
               - project-compare-type: 'REG_EXP'
-                project-pattern: 'functest|sdnvpn'
+                project-pattern: 'functest|sdnvpn|qtip'
                 branches:
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
index 7733aba..a69badb 100644 (file)
             # empty string: ""
             FLAKE_COUNT="$(find . \
                 -path './releng_flake8' -prune -o \
+                -path './.tox' -prune -o \
                 -type f -name "*.py" -print | \
                 xargs flake8 --exit-zero -qq --count 2>&1)"
 
               echo "Flake8 Violations: $FLAKE_COUNT" > lint.log
               find . \
                   -path './releng_flake8' -prune -o \
+                  -path './.tox' -prune -o \
                   -type f -name "*.py" -print | \
                   xargs flake8 --exit-zero --first >> violation.log
               SHOWN=$(wc -l violation.log | cut -d' ' -f1)
index 60551f5..f346c1c 100644 (file)
@@ -2,6 +2,7 @@
     name: builder-jobs
     jobs:
         - 'builder-verify-jjb'
+        - 'builder-sandbox'
         - 'builder-merge'
         - 'artifacts-api'
 
                 git pull
                 jenkins-jobs update --delete-old jjb/
 
+- job-template:
+    name: 'builder-sandbox'
+
+    # Upload all jjb jobs to sandbox instance, excluding jobs jjb
+    # builder jobs
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: 'master'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: 'releng'
+                branches:
+                    - branch-compare-type: 'ANT'
+                      branch-pattern: '**/sandbox'
+                file-paths:
+                    - compare-type: ANT
+                      pattern: jjb/**
+                    - compare-type: ANT
+                      pattern: utils/**
+
+    builders:
+        - shell:
+            !include-raw: verify-releng.sh
+        - shell: |
+                #!/bin/bash
+                source /opt/virtualenv/jenkins-job-builder/bin/activate
+                cd /opt/jenkins-ci/releng
+                git pull
+                cp /etc/jenkins_jobs/jenkins_jobs.ini jenkins_sandbox.ini
+                sed -i 's/url=.*/url=https:\/\/sandbox.opnfv.org\//g' jenkins_sandbox.ini
+                jenkins-jobs --conf jenkins_sandbox.ini update -r -x jjb/releng --delete-old jjb
+                rm -f jenkins_sandbox.ini
+
 - job-template:
     name: 'artifacts-api'
 
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 b385fa8..d36561d 100644 (file)
@@ -54,7 +54,7 @@ if [ -d "$dir_result" ]; then
                 echo "Not possible to push results to artifact: gsutil not installed.";
             else
                 echo "copy result files to artifact $project_artifact"
-                gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/
+                gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1
             fi
         fi
     else