[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH v11 20/20] Introduce flight for stable branches of OpenStack



OpenStack have many different repo which should be in sync, so this
patch should grab the revisions of the stable branch of every OpenStack
tree. Tempest does not have stable branch and should be able to test any
OpenStack version.

This patch also create flight for the latest release of OpenStack named
Ocata instead of testing branch master, as the scripts are not yet ready
to test it.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 ap-fetch-version     | 18 +++++++++-
 ap-fetch-version-old |  8 +++++
 ap-print-url         |  2 +-
 ap-push              |  6 ++++
 cr-daily-branch      | 36 +++++++++++++++++---
 cr-for-branches      |  2 +-
 cri-common           |  2 +-
 make-flight          | 11 +++---
 8 files changed, 72 insertions(+), 13 deletions(-)

diff --git a/ap-fetch-version b/ap-fetch-version
index a714ee2..54265f4 100755
--- a/ap-fetch-version
+++ b/ap-fetch-version
@@ -106,10 +106,26 @@ ovmf)
        repo_tree_rev_fetch_git ovmf \
                $TREE_OVMF_UPSTREAM master $LOCALREV_OVMF
        ;;
-openstack-nova)
+openstack-tempest*)
+        # OpenStack Tempest does not have stable branches and should work with 
any
+        # version of OpenStack
        repo_tree_rev_fetch_git openstack-nova \
                $TREE_OPENSTACK_NOVA master $LOCALREV_OPENSTACK_NOVA
        ;;
+openstack-*-*)
+       os_tree="${branch#openstack-}"
+       os_tree="${os_tree%-*}"
+       branchcore="${branch##*-}"
+       eval repo_tree_rev_fetch_git "openstack-$os_tree" \
+               "\$TREE_OPENSTACK_${os_tree^^}" "stable/$branchcore" \
+                "\$LOCALREV_OPENSTACK_${os_tree^^}"
+       ;;
+openstack-*)
+       os_tree="${branch#openstack-}"
+       eval repo_tree_rev_fetch_git "openstack-$os_tree" \
+               "\$TREE_OPENSTACK_${os_tree^^}" "master" \
+                "\$LOCALREV_OPENSTACK_${os_tree^^}"
+       ;;
 osstest)
         if [ "x$OSSTEST_USE_HEAD" = "xy" ] ; then
            git update-ref -m "Arranging to test HEAD" \
diff --git a/ap-fetch-version-old b/ap-fetch-version-old
index 6dddbb7..00af8fa 100755
--- a/ap-fetch-version-old
+++ b/ap-fetch-version-old
@@ -115,6 +115,14 @@ ovmf)
        repo_tree_rev_fetch_git ovmf \
                $BASE_TREE_OVMF xen-tested-master $BASE_LOCALREV_OVMF
        ;;
+openstack-nova-*)
+       os_tree="${branch#openstack-}"
+       os_tree="${os_tree%-*}"
+       branchcore="${branch##*-}"
+       eval repo_tree_rev_fetch_git "openstack-$os_tree" \
+               "\$BASE_TREE_OPENSTACK_${os_tree^^}" "xen-tested-$branchcore" \
+                "\$BASE_LOCALREV_OPENSTACK_${os_tree^^}"
+       ;;
 openstack-nova)
        repo_tree_rev_fetch_git openstack-nova \
                $BASE_TREE_OPENSTACK_NOVA xen-tested-master 
$BASE_LOCALREV_OPENSTACK_NOVA
diff --git a/ap-print-url b/ap-print-url
index 6f4e6b1..6d42ddf 100755
--- a/ap-print-url
+++ b/ap-print-url
@@ -67,7 +67,7 @@ ovmf)
 osstest)
        echo none:;
        ;;
-openstack-nova)
+openstack-nova*)
        echo $TREE_OPENSTACK_NOVA
        ;;
 *)
diff --git a/ap-push b/ap-push
index 136d1b6..0cac8a6 100755
--- a/ap-push
+++ b/ap-push
@@ -134,6 +134,12 @@ openstack-nova)
        cd $repos/openstack-nova
        git push $TREE_OPENSTACK_NOVA $revision:refs/heads/xen-tested-master
        ;;
+openstack-nova-*)
+        cd $repos/openstack-nova
+        openstack_nova_branch=${branch#openstack-nova-}
+        git push $TREE_OPENSTACK_NOVA \
+                $revision:refs/heads/xen-tested-stable-$openstack_nova_branch
+        ;;
 osstest)
        git push $HOME/testing.git $revision:production
        if [ x"$TREEBRANCH_OSSTEST_UPSTREAM" != x ] ; then
diff --git a/cr-daily-branch b/cr-daily-branch
index 5b24c47..20c95fc 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -207,10 +207,38 @@ if [ "x$REVISION_LINUXFIRMWARE" = x ]; then
        determine_version REVISION_LINUXFIRMWARE linuxfirmware LINUXFIRMWARE
         export REVISION_LINUXFIRMWARE
 fi
-if [ "x$REVISION_OPENSTACK_NOVA" = x ]; then
-        determine_version REVISION_OPENSTACK_NOVA openstack-nova OPENSTACK_NOVA
-        export REVISION_OPENSTACK_NOVA
-fi
+openstack_rev() {
+        local os_tree="$1"
+        local os_branch
+
+        if eval [ "x\$REVISION_OPENSTACK_${os_tree^^}" = x ]; then
+                case "$branch" in
+                openstack-*-*)
+                        os_branch="openstack-$os_tree-${branch##*-}"
+                        os_git_branch="origin/stable/${branch##*-}"
+                        ;;
+                *)
+                        os_branch="openstack-$os_tree"
+                        os_git_branch="origin/master"
+                        ;;
+                esac
+
+                # Use latest version, even for other openstack trees
+                # so branch openstack-nova-ocata should have other trees like
+                # openstack-neutron have the revision of the same branch fetch
+                # at the same time
+                if [ "$branch" != "$os_branch" ]; then
+                        eval "export 
REVISION_OPENSTACK_${os_tree^^}=$os_git_branch"
+                        return
+                fi
+                determine_version "REVISION_OPENSTACK_${os_tree^^}" \
+                        "$os_branch" "OPENSTACK_${os_tree^^}"
+                eval "export REVISION_OPENSTACK_${os_tree^^}"
+        fi
+}
+for os_tree in cinder devstack glance keystone neutron nova requirements; do
+        openstack_rev "$os_tree"
+done
 
 case "$tree" in
 xen)
diff --git a/cr-for-branches b/cr-for-branches
index 7096e03..17f8b58 100755
--- a/cr-for-branches
+++ b/cr-for-branches
@@ -31,7 +31,7 @@ scriptoptions="$1"; shift
 LOGFILE=tmp/cr-for-branches.log
 export LOGFILE
 
-: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing 
xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing 
xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline 
qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing 
qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing 
qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing 
linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 
linux-3.4 linux-arm-xen seabios ovmf xtf openstack-nova ${EXTRA_BRANCHES}}
+: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing 
xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing 
xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline 
qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing 
qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing 
qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing 
linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 
linux-3.4 linux-arm-xen seabios ovmf xtf openstack-nova-ocata ${EXTRA_BRANCHES}}
 export BRANCHES
 
 fetchwlem=$wlem
diff --git a/cri-common b/cri-common
index 126f90c..ae091fb 100644
--- a/cri-common
+++ b/cri-common
@@ -82,7 +82,7 @@ select_xenbranch () {
        ovmf)                   tree=ovmf;      xenbranch=xen-unstable ;;
        distros-*|examine)      tree=none;      xenbranch=xen-unstable ;;
        osstest)                tree=osstest;   xenbranch=xen-unstable ;;
-       openstack-nova)    tree=openstack-nova; xenbranch=xen-unstable ;;
+       openstack-nova*)   tree=openstack-nova; xenbranch=xen-unstable ;;
        esac
        if [ "x$tree" = xlinux ]; then
                linuxbranch=$branch
diff --git a/make-flight b/make-flight
index a0c9d2b..14b27c4 100755
--- a/make-flight
+++ b/make-flight
@@ -183,7 +183,7 @@ job_create_test_filter_callback () {
         *) return 1;;
       esac
       ;;
-    openstack-nova)
+    openstack-nova*)
       case "$job" in
         *-devstack) ;;
         *-devstack-xsm) ;;
@@ -229,7 +229,7 @@ arch_branch_filter_callback () {
   i386)
         case "$branch" in
         linux-arm-xen) return 1;;
-        openstack-nova) return 1;;
+        openstack-nova*) return 1;;
         esac
         ;;
   amd64)
@@ -699,9 +699,10 @@ do_openstack_tests () {
     local openstack_trees=(cinder devstack glance keystone neutron nova
         requirements tempest)
 
-    if [ $branch != openstack-nova ]; then
-        return
-    fi
+    case "$branch" in
+        openstack-nova*)          ;;
+        *)                return  ;;
+    esac
 
     local os_runvars=""
     for tree in "${openstack_trees[@]}"; do
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.