summaryrefslogtreecommitdiffstats
path: root/jjb/apex
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex')
-rwxr-xr-xjjb/apex/apex-gs-cleanup.sh19
-rwxr-xr-xjjb/apex/apex-iso-verify.sh81
-rw-r--r--jjb/apex/apex.yml104
-rw-r--r--jjb/apex/apex.yml.j210
4 files changed, 60 insertions, 154 deletions
diff --git a/jjb/apex/apex-gs-cleanup.sh b/jjb/apex/apex-gs-cleanup.sh
deleted file mode 100755
index 1629aa85e..000000000
--- a/jjb/apex/apex-gs-cleanup.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-set -o errexit
-set -o nounset
-set -o pipefail
-
-# log info to console
-echo "Cleaning Google Storage"
-echo "-----------------------"
-echo
-
-thirty_days_ago=$(date -d "30 days ago" +"%Y%m%d")
-
-for i in $(gsutil ls gs://$GS_URL/*201?*); do
- filedate=$(date -d "$(echo $i | grep -Eo 201[0-9]-?[0-9][0-9]-?[0-9][0-9])" +"%Y%m%d")
- if [ $filedate -lt $thirty_days_ago ]; then
- # gsutil indicates what it is removing so no need for output here
- gsutil rm $i
- fi
-done
diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh
index cdeac04d7..f102421f3 100755
--- a/jjb/apex/apex-iso-verify.sh
+++ b/jjb/apex/apex-iso-verify.sh
@@ -8,8 +8,6 @@ echo "Starting the Apex iso verify."
echo "--------------------------------------------------------"
echo
-BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
-
source $BUILD_DIRECTORY/../opnfv.properties
if ! rpm -q virt-install > /dev/null; then
@@ -29,76 +27,37 @@ fi
# Make sure a pre-existing iso-verify isn't there
rm_apex_iso_verify
+#make sure there is not an existing console log file for the VM
+sudo rm -f /var/log/libvirt/qemu/apex-iso-verify-console.log
+
# run an install from the iso
# This streams a serial console to tcp port 3737 on localhost
sudo virt-install -n apex-iso-verify -r 4096 --vcpus 4 --os-variant=rhel7 \
- --accelerate -v --noautoconsole --nographics \
+ --accelerate -v --noautoconsole \
--disk path=/var/lib/libvirt/images/apex-iso-verify.qcow2,size=30,format=qcow2 \
-l $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso \
--extra-args 'console=ttyS0 console=ttyS0,115200n8 serial inst.ks=file:/iso-verify.ks inst.stage2=hd:LABEL=OPNFV\x20CentOS\x207\x20x86_64:/' \
--initrd-inject $BUILD_DIRECTORY/../ci/iso-verify.ks \
- --serial tcp,host=:3737,protocol=raw
-
-# Attach to tcpport 3737 and echo the output to stdout
-# watch for a 5 min time out, a power off message or a tcp disconnect
-python << EOP
-#!/usr/bin/env python
-
-import sys
-import socket
-from time import sleep
-from time import time
-
-
-TCP_IP = '127.0.0.1'
-TCP_PORT = 3737
-BUFFER_SIZE = 1024
-
-try:
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((TCP_IP, TCP_PORT))
-except Exception, e:
- print "Failed to connect to the iso-verofy vm's serial console"
- print "this probably means that the VM failed to start"
- raise e
-
-activity = time()
-data = s.recv(BUFFER_SIZE)
-last_data = data
-while time() - activity < 300:
- try:
- if data != last_data:
- activity = time()
- last_data = data
- data = s.recv(BUFFER_SIZE)
- sys.stdout.write(data)
- if 'Powering off' in data:
- break
- sleep(.5)
- except socket.error, e:
- # for now assuming that the connection was closed
- # which is good, means the vm finished installing
- # printing the error output just in case we need to debug
- print "VM console connection lost: %s" % msg
- break
-s.close()
-
-if time() - activity > 300:
- print "failing due to console inactivity"
- exit(1)
-else:
- print "Success!"
-EOP
-
-# save the python return code for after cleanup
-python_rc=$?
+ --serial file,path=/var/log/libvirt/qemu/apex-iso-verify-console.log
+
+echo "Waiting for install to finish..."
+sleep 10
+end_time=$(($SECONDS+1500))
+while ! [[ `sudo tail -n1 /var/log/libvirt/qemu/apex-iso-verify-console.log` =~ 'Power down' ]]; do
+ if [ $SECONDS -gt $end_time ] || ! sudo virsh list --all | grep apex-iso-verify | grep running > /dev/null; then
+ sudo cat /var/log/libvirt/qemu/apex-iso-verify-console.log
+ sudo virsh list --all
+ echo "Error: Failed to find power down message after install"
+ exit 1
+ fi
+ sleep 10
+done
+
+sudo cat /var/log/libvirt/qemu/apex-iso-verify-console.log
# clean up
rm_apex_iso_verify
-# Exit with the RC of the Python job
-exit $python_rc
-
echo
echo "--------------------------------------------------------"
echo "Done!"
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index de565ed66..861b713a0 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -13,7 +13,7 @@
- 'apex-csit-promote-daily-{stream}'
- 'apex-fdio-promote-daily-{stream}'
- 'apex-verify-iso-{stream}'
- - 'apex-deploy-test-baremetal-{stream}'
+ - 'apex-run-deploy-test-baremetal-{stream}'
- 'apex-upload-snapshot'
- 'apex-create-snapshot'
# stream: branch with - in place of / (eg. stable-arno)
@@ -545,7 +545,7 @@
# Baremetal Deploy and Test
- job-template:
- name: 'apex-deploy-test-baremetal-{stream}'
+ name: 'apex-run-deploy-test-baremetal-{stream}'
# Job template for daily build
#
@@ -578,9 +578,9 @@
block-level: 'NODE'
blocking-jobs:
- 'apex-verify.*'
- - 'apex-deploy.*'
- 'apex-runner.*'
- 'apex-.*-promote.*'
+ - 'apex-run.*'
builders:
- description-setter:
description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
@@ -678,7 +678,7 @@
- name: 'apex-verify-iso-danube'
current-parameters: false
predefined-parameters: |
- BUILD_DIRECTORY=apex-build-danube/.build
+ BUILD_DIRECTORY=$WORKSPACE/../apex-build-danube/.build
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
@@ -692,7 +692,7 @@
condition: SUCCESSFUL
projects:
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -702,7 +702,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -712,7 +712,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -722,7 +722,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -732,7 +732,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -742,7 +742,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -752,7 +752,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -762,7 +762,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -772,7 +772,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -782,7 +782,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -792,7 +792,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -802,7 +802,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -812,7 +812,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -822,7 +822,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -832,7 +832,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -842,7 +842,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -852,7 +852,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -862,7 +862,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -872,7 +872,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -882,7 +882,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -892,7 +892,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -902,7 +902,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -912,7 +912,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -922,7 +922,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -932,7 +932,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -942,7 +942,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-danube'
+ - name: 'apex-run-deploy-test-baremetal-danube'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -1009,7 +1009,7 @@
- name: 'apex-verify-iso-master'
current-parameters: false
predefined-parameters: |
- BUILD_DIRECTORY=apex-build-master/.build
+ BUILD_DIRECTORY=$WORKSPACE/../apex-build-master/.build
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
@@ -1023,7 +1023,7 @@
condition: SUCCESSFUL
projects:
- - name: 'apex-deploy-test-baremetal-master'
+ - name: 'apex-run-deploy-test-baremetal-master'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -1033,7 +1033,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-master'
+ - name: 'apex-run-deploy-test-baremetal-master'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -1043,7 +1043,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-master'
+ - name: 'apex-run-deploy-test-baremetal-master'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -1053,7 +1053,7 @@
abort-all-job: true
git-revision: false
- - name: 'apex-deploy-test-baremetal-master'
+ - name: 'apex-run-deploy-test-baremetal-master'
node-parameters: false
current-parameters: false
predefined-parameters: |
@@ -1290,30 +1290,6 @@
abort-all-job: true
git-revision: false
-- job-template:
- name: 'apex-gs-clean-{stream}'
-
- # Job template for clean
- #
- # Required Variables:
- # stream: branch with - in place of / (eg. stable)
- node: '{slave}'
-
- disabled: false
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - apex-parameter:
- gs-pathname: '{gs-pathname}'
-
- builders:
- - 'apex-gs-clean'
-
- triggers:
- - 'apex-gs-clean-{stream}'
-
########################
# parameter macros
########################
@@ -1390,12 +1366,6 @@
!include-raw: ./apex-download-artifact.sh
- builder:
- name: 'apex-gs-cleanup'
- builders:
- - shell:
- !include-raw: ./apex-gs-cleanup.sh
-
-- builder:
name: 'apex-deploy'
builders:
- shell:
@@ -1412,7 +1382,3 @@
name: 'apex-danube'
triggers:
- timed: '0 12 * * *'
-- trigger:
- name: 'apex-gs-clean-{stream}'
- triggers:
- - timed: '0 2 * * *' \ No newline at end of file
diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2
index d739a7068..1df6e154c 100644
--- a/jjb/apex/apex.yml.j2
+++ b/jjb/apex/apex.yml.j2
@@ -13,7 +13,7 @@
- 'apex-csit-promote-daily-{stream}'
- 'apex-fdio-promote-daily-{stream}'
- 'apex-verify-iso-{stream}'
- - 'apex-deploy-test-baremetal-{stream}'
+ - 'apex-run-deploy-test-baremetal-{stream}'
- 'apex-upload-snapshot'
- 'apex-create-snapshot'
# stream: branch with - in place of / (eg. stable-arno)
@@ -545,7 +545,7 @@
# Baremetal Deploy and Test
- job-template:
- name: 'apex-deploy-test-baremetal-{stream}'
+ name: 'apex-run-deploy-test-baremetal-{stream}'
# Job template for daily build
#
@@ -578,9 +578,9 @@
block-level: 'NODE'
blocking-jobs:
- 'apex-verify.*'
- - 'apex-deploy.*'
- 'apex-runner.*'
- 'apex-.*-promote.*'
+ - 'apex-run.*'
builders:
- description-setter:
description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
@@ -678,7 +678,7 @@
- name: 'apex-verify-iso-{{ stream }}'
current-parameters: false
predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{{ stream }}/.build
+ BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
@@ -692,7 +692,7 @@
condition: SUCCESSFUL
projects:
{% for scenario in scenarios[stream] %}
- - name: 'apex-deploy-test-baremetal-{{ stream }}'
+ - name: 'apex-run-deploy-test-baremetal-{{ stream }}'
node-parameters: false
current-parameters: false
predefined-parameters: |