natapp project jenkins builder jobs
[releng/builder.git] / jjb / ovsdb / include-raw-openstack-ci.sh
index 9fbd6b8ba47b14ef7690f6e192ecbc67b27bec2b..9e9ff8fcb9ad4b10fd599b6aac06cba045e13518 100644 (file)
@@ -16,13 +16,13 @@ sudo mkdir -p /opt/stack/new
 sudo chown -R jenkins:jenkins /opt/stack/new
 sudo bash -c 'echo "stack ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers'
 
-# We need to install some scripts from openstack-infra/project-config
+# We need to install some scripts from openstack/os-testr project
 cd ~
 echo "Setting up infra scripts"
 sudo mkdir -p /usr/local/jenkins/slave_scripts
-git clone https://git.openstack.org/openstack-infra/project-config
-cd project-config
-sudo cp jenkins/scripts/subunit2html.py /usr/local/jenkins/slave_scripts
+git clone https://github.com/openstack/os-testr.git
+cd os-testr/os_testr
+sudo cp subunit2html.py /usr/local/jenkins/slave_scripts
 
 # Save existing WORKSPACE
 SAVED_WORKSPACE=$WORKSPACE
@@ -80,19 +80,11 @@ fi
 ## # Trim down the boot wait time
 ## export ODL_BOOT_WAIT=30
 
-# Use Lithium build, if asked to do so
-if [ "${ODL_VERSION}" == "lithium-latest" ] ; then
-    NEXUSPATH="${URL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf"
-    BUNDLEVERSION='0.3.0-SNAPSHOT'
-
-    # Acquire the timestamp information from maven-metadata.xml
-    wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
-    BUNDLE_TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null`
-    echo "Nexus timestamp is ${BUNDLE_TIMESTAMP}"
-
-    DEVSTACK_LOCAL_CONFIG+="ODL_NAME=distribution-karaf-${BUNDLEVERSION};"
-    DEVSTACK_LOCAL_CONFIG+="ODL_PKG=distribution-karaf-${BUNDLE_TIMESTAMP}.zip;"
-    DEVSTACK_LOCAL_CONFIG+="ODL_URL=${NEXUSPATH}/${BUNDLEVERSION};"
+# Use specific build, if asked to do so
+if [ "${ODL_VERSION}" == "beryllium" ] ; then
+    DEVSTACK_LOCAL_CONFIG+="ODL_RELEASE=beryllium-snapshot-0.4.0;"
+elif [ "${ODL_VERSION}" == "lithium" ] ; then
+    DEVSTACK_LOCAL_CONFIG+="ODL_RELEASE=lithium-snapshot-0.3.1;"
 fi
 
 # And this runs devstack-gate
@@ -107,14 +99,14 @@ fi
 # Because we are testing a non standard project, add
 # our project repository. This makes zuul do the right
 # reference magic for testing changes.
-export PROJECTS="stackforge/networking-odl $PROJECTS"
+export PROJECTS="openstack/networking-odl $PROJECTS"
 # Note the actual url here is somewhat irrelevant because it
 # caches in nodepool, however make it a valid url for
 # documentation purposes.
-if [ "$GERRIT_PROJECT" == "stackforge/networking-odl" ]; then
+if [ "$GERRIT_PROJECT" == "openstack/networking-odl" ]; then
     export DEVSTACK_LOCAL_CONFIG+="enable_plugin networking-odl https://$GERRIT_HOST/$GERRIT_PROJECT $GERRIT_REFSPEC"
 else
-    export DEVSTACK_LOCAL_CONFIG+="enable_plugin networking-odl https://git.openstack.org/stackforge/networking-odl"
+    export DEVSTACK_LOCAL_CONFIG+="enable_plugin networking-odl https://git.openstack.org/openstack/networking-odl"
 fi
 
 
@@ -141,9 +133,11 @@ DGRET=$?
 OS_WORKSPACE=$WORKSPACE
 export WORKSPACE=$SAVED_WORKSPACE
 
-# Copy all the logs
+# Copy and display all the logs
+cat /opt/stack/new/devstacklog*
+ls /opt/stack/; ls /opt/stack/new; ls /opt/stack/new/opendaylight;
 cp -r $OS_WORKSPACE/logs $WORKSPACE
-cp -a /opt/stack/new/logs/q-odl-karaf* $WORKSPACE/logs
+cp -a /opt/stack/new/logs/screen-odl-karaf* $WORKSPACE/logs
 mkdir -p $WORKSPACE/logs/opendaylight
 cp -a /opt/stack/new/opendaylight/distribution*/etc $WORKSPACE/logs/opendaylight
 # Unzip the logs to make them easier to view