summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-09 11:32:44 -0400
committerTim Rozet <trozet@redhat.com>2018-08-09 15:24:36 -0400
commit37a38451ebf17ae617037844ed0f6b7eeab5985e (patch)
tree71bf5cfb225abd1fad018c732c901add7b0071fb
parent545447c4ce40100e30ae20cb3dd25b982a20f308 (diff)
Apex: Use CSIT to gate snapshot promotion
Now that we have CSIT suite passing, we want to use that to gate our snapshot promotion rather than tempest. Change-Id: Ifddaf7921da15150a253021ee5ca64ab2fd438ff Signed-off-by: Tim Rozet <trozet@redhat.com>
-rwxr-xr-xjjb/apex/apex-fetch-snap-info.sh46
-rw-r--r--jjb/apex/apex-snapshot-create.sh18
-rw-r--r--jjb/apex/apex.yaml55
-rw-r--r--jjb/apex/apex.yaml.j255
4 files changed, 150 insertions, 24 deletions
diff --git a/jjb/apex/apex-fetch-snap-info.sh b/jjb/apex/apex-fetch-snap-info.sh
new file mode 100755
index 000000000..2cfaa59d7
--- /dev/null
+++ b/jjb/apex/apex-fetch-snap-info.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+##############################################################################
+# Copyright (c) 2018 Tim Rozet (Red Hat) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+echo "Fetching overcloudrc, ssh key, and node.yaml from deployment..."
+
+SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
+
+tmp_dir=/tmp/csit
+rm -rf ${tmp_dir}
+mkdir -p ${tmp_dir}
+
+# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these
+pushd ${tmp_dir} > /dev/null
+echo "Copying overcloudrc and ssh key from Undercloud..."
+# Store overcloudrc
+UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
+sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./
+# Copy out ssh key of stack from undercloud
+sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./
+sudo chmod 0600 id_rsa
+popd > /dev/null
+
+echo "Gathering introspection information"
+git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git
+pushd sdnvpn/odl-pipeline/lib > /dev/null
+sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml
+popd > /dev/null
+sudo rm -rf sdnvpn
+
+sudo chown jenkins-ci:jenkins-ci ${tmp_dir}/*
+
+ls -lrt ${tmp_dir}
+
+echo "Fetch complete"
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh
index b73931470..f91720883 100644
--- a/jjb/apex/apex-snapshot-create.sh
+++ b/jjb/apex/apex-snapshot-create.sh
@@ -27,22 +27,8 @@ echo
tmp_dir=$(pwd)/.tmp
mkdir -p ${tmp_dir}
-# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these
-pushd ${tmp_dir} > /dev/null
-echo "Copying overcloudrc and ssh key from Undercloud..."
-# Store overcloudrc
-UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
-sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./
-# Copy out ssh key of stack from undercloud
-sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./
-popd > /dev/null
-
-echo "Gathering introspection information"
-git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git
-pushd sdnvpn/odl-pipeline/lib > /dev/null
-sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml
-popd > /dev/null
-sudo rm -rf sdnvpn
+# info should have already been collected in apex-fetch-snap-info so copy it
+cp -r /tmp/csit/* ${tmp_dir}/
echo "Shutting down nodes"
# Shut down nodes
diff --git a/jjb/apex/apex.yaml b/jjb/apex/apex.yaml
index 426ca3222..8b48fb4cf 100644
--- a/jjb/apex/apex.yaml
+++ b/jjb/apex/apex.yaml
@@ -188,10 +188,13 @@
os_version:
- 'pike':
os_scenario: 'pike'
+ odl_branch: 'stable/carbon'
- 'queens':
os_scenario: 'queens'
+ odl_branch: 'stable/oxygen'
- 'master':
os_scenario: 'nofeature'
+ odl_branch: 'stable/oxygen'
topology:
- 'noha'
@@ -755,6 +758,19 @@
git-revision: true
- apex-builder-{stream}
+# snapshot info fetch
+- job-template:
+ name: 'apex-fetch-snap-info'
+
+ disabled: false
+
+ parameters:
+ - '{project}-defaults'
+
+ builders:
+ - shell:
+ !include-raw: ./apex-fetch-snap-info.sh
+
# snapshot create
- job-template:
name: 'apex-create-snapshot'
@@ -816,6 +832,14 @@
name: GS_URL
default: $GS_BASE{gs-pathname}/{os_version}/{topology}
description: "User for overriding GS_URL from apex params"
+ - string:
+ name: OS_VERSION
+ default: '{os_version}'
+ description: OpenStack version short name
+ - string:
+ name: ODL_BRANCH
+ default: '{odl_branch}'
+ description: ODL branch being used
properties:
- build-blocker:
@@ -837,10 +861,10 @@
builders:
- multijob:
- name: apex-virtual-deploy-test
+ name: apex-virtual-deploy
condition: SUCCESSFUL
projects:
- - name: 'apex-virtual-{stream}'
+ - name: 'apex-deploy-virtual-{stream}'
current-parameters: true
predefined-parameters: |
DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
@@ -849,13 +873,36 @@
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- FUNCTEST_SUITE_NAME=tempest_smoke
- FUNCTEST_MODE=testcase
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
- multijob:
+ name: fetch snapshot info
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-fetch-snap-info'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: csit
+ condition: SUCCESSFUL
+ projects:
+ - name: cperf-apex-csit-master
+ predefined-parameters: |
+ ODL_BRANCH=$ODL_BRANCH
+ RC_FILE_PATH=/tmp/csit/overcloudrc
+ NODE_FILE_PATH=/tmp/csit/node.yaml
+ SSH_KEY_PATH=/tmp/csit/id_rsa
+ ODL_CONTAINERIZED=true
+ OS_VERSION=$OS_VERSION
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: false
+ - multijob:
name: create snapshot
condition: SUCCESSFUL
projects:
diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2
index d72120055..10ad5fbba 100644
--- a/jjb/apex/apex.yaml.j2
+++ b/jjb/apex/apex.yaml.j2
@@ -76,10 +76,13 @@
os_version:
- 'pike':
os_scenario: 'pike'
+ odl_branch: 'stable/carbon'
- 'queens':
os_scenario: 'queens'
+ odl_branch: 'stable/oxygen'
- 'master':
os_scenario: 'nofeature'
+ odl_branch: 'stable/oxygen'
topology:
- 'noha'
@@ -643,6 +646,19 @@
git-revision: true
- apex-builder-{stream}
+# snapshot info fetch
+- job-template:
+ name: 'apex-fetch-snap-info'
+
+ disabled: false
+
+ parameters:
+ - '{project}-defaults'
+
+ builders:
+ - shell:
+ !include-raw: ./apex-fetch-snap-info.sh
+
# snapshot create
- job-template:
name: 'apex-create-snapshot'
@@ -704,6 +720,14 @@
name: GS_URL
default: $GS_BASE{gs-pathname}/{os_version}/{topology}
description: "User for overriding GS_URL from apex params"
+ - string:
+ name: OS_VERSION
+ default: '{os_version}'
+ description: OpenStack version short name
+ - string:
+ name: ODL_BRANCH
+ default: '{odl_branch}'
+ description: ODL branch being used
properties:
- build-blocker:
@@ -725,10 +749,10 @@
builders:
- multijob:
- name: apex-virtual-deploy-test
+ name: apex-virtual-deploy
condition: SUCCESSFUL
projects:
- - name: 'apex-virtual-{stream}'
+ - name: 'apex-deploy-virtual-{stream}'
current-parameters: true
predefined-parameters: |
DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
@@ -737,13 +761,36 @@
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- FUNCTEST_SUITE_NAME=tempest_smoke
- FUNCTEST_MODE=testcase
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
- multijob:
+ name: fetch snapshot info
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-fetch-snap-info'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: csit
+ condition: SUCCESSFUL
+ projects:
+ - name: cperf-apex-csit-master
+ predefined-parameters: |
+ ODL_BRANCH=$ODL_BRANCH
+ RC_FILE_PATH=/tmp/csit/overcloudrc
+ NODE_FILE_PATH=/tmp/csit/node.yaml
+ SSH_KEY_PATH=/tmp/csit/id_rsa
+ ODL_CONTAINERIZED=true
+ OS_VERSION=$OS_VERSION
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: false
+ - multijob:
name: create snapshot
condition: SUCCESSFUL
projects: