Merge changes from topic 'RELENG-704'
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 13 Dec 2017 19:55:13 +0000 (19:55 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 13 Dec 2017 19:55:13 +0000 (19:55 +0000)
* changes:
  Use protected to prevent cleanup script rming img
  Update cleanup scripts to work in Vex
  Update Orchestration scripts to work with Vex
  Update mininet and docker builders
  Update java-builder build-nodes for new cloud
  Update packer config to work in Vexxhost

docs/cloud-images.rst
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/packaging/build-rpm.sh
jjb/packaging/install-rpm.sh
jjb/packaging/packaging.yaml
jjb/packaging/test-rpm-deps.sh

index 2851d0e2ac60184466ec2dafa7b040e0a8c9d98a..cc400ada730b26ddd29647822217b7f08e9e11a7 100644 (file)
@@ -82,6 +82,7 @@ Following are the list of published images available to be used with Jenkins job
 * Ubuntu 14.04 LTS Trusty Tahr (cloudimg)
 * Ubuntu 16.04 - gbp - 20170308-0321
 * Ubuntu 16.04 - gbp - 20170823-0529
+* Ubuntu 16.04 - gbp - 20171212-0322
 * Ubuntu 16.04 - mininet-ovs-25 - 20170308-0230
 * Ubuntu 16.04 - mininet-ovs-25 - 20170516-0740
 * Ubuntu 16.04 - mininet-ovs-25 - 20170606-0534
index 5e3421dcfb2774cfb1111e5403e17f9d9400f1a2..bb35f5f86b55dfbe1a207bf14da38eeb13d2e756 100644 (file)
@@ -513,6 +513,7 @@ EOF
         OSIP=OPENSTACK_CONTROL_NODE_${i}_IP
         NODE_FOLDER="control_${i}"
         mkdir -p ${NODE_FOLDER}
+        scp ${!OSIP}:/etc/dnsmasq.conf ${NODE_FOLDER}
         scp ${!OSIP}:/etc/keystone/keystone.conf ${NODE_FOLDER}
         scp ${!OSIP}:/etc/keystone/keystone-uwsgi-admin.ini ${NODE_FOLDER}
         scp ${!OSIP}:/etc/keystone/keystone-uwsgi-public.ini ${NODE_FOLDER}
@@ -553,6 +554,7 @@ EOF
         scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
         scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}
         mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf
+        mv /tmp/qdhcp ${NODE_FOLDER}
         mv ${NODE_FOLDER} ${WORKSPACE}/archives/
     done
 
index 73d6c198cf25ee81afd621a70a707e499167d188..9218d5a5fba25473e9554206c554ddfe5524354f 100644 (file)
@@ -38,14 +38,13 @@ fi
 
 # Publish RPMs to Nexus if in production Jenkins, else host on sandbox Jenkins
 if [ "$SILO" == "sandbox" ]; then
-  # TODO: Host RPMs on Jenkins temporarily
   echo "Not uploading RPMs to Nexus because running in sandbox"
 elif  [ "$SILO" == "releng" ]; then
   # Move RPMs (SRPM and noarch) to dir of files that will be uploaded to Nexus
   UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
   mkdir -p "$UPLOAD_FILES_PATH"
-  mv "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
-  mv "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"
+  cp "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
+  cp "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"
 else
   echo "Unknown Jenkins silo: $SILO"
   exit 1
index 7f72f0683a67badeff0f5b8f625e138b7bf3c888..2ccc50078f18452dfe42bc5aabf50aa3d3c1d9a7 100644 (file)
@@ -9,12 +9,15 @@ set -ex -o pipefail
 # Update mirror list to avoid slow/hung one
 sudo yum update -y yum-plugin-fastestmirror
 
-# Install ODL from .rpm link or .repo url
-if [[ $URL == *.rpm ]]
-then
+# Install ODL from RPM path, RPM URL or .repo file url
+# NB: Paths must be anchored at root
+if [[ $URL == /*  ]]; then
+  # If path is globbed (/path/to/*.rpm), expand it
+  path=$(sudo find / -wholename $URL)
+  sudo yum install -y "$path"
+elif [[ $URL == *.rpm ]]; then
   sudo yum install -y "$URL"
-elif [[ $URL == *.repo ]]
-then
+elif [[ $URL == *.repo ]]; then
   # shellcheck disable=SC2154
   repo_file="${{URL##*/}}"
   sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
index 437d71bf19749fb8a4e0929f1b9090fdd67e6bf9..4a1338ba02f61826d68b08be063ca178beadea48 100644 (file)
     builders:
       - shell: !include-raw: build-rpm.sh
       - shell: !include-raw: test-rpm-deps.sh
+      - inject:
+          properties-content: 'URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm'
+      - shell: !include-raw: install-rpm.sh
+      - shell: !include-raw: start-odl.sh
+      - shell: |
+          # Install expect to interact with Karaf shell
+          sudo yum install -y expect
+          # Install nmap to check status of ODL's SSH port
+          sudo yum install -y nmap
+      - shell: !include-raw: test-karaf.expect
+      - shell: !include-raw: stop-odl.sh
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
       - inject:
           properties-content: 'STREAM={stream}'
       - shell: !include-raw: build-rpm-snap.sh
+      - shell: !include-raw: test-rpm-deps.sh
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
index 987d4ce9d794d62cee6c98446fa6ee0ca5ae416f..4aa90dd8a45154e64804d44da5135db79bc45cb7 100644 (file)
@@ -20,19 +20,24 @@ declare -a expected_deps=( "/bin/bash"
                            "shadow-utils"
                            "rpmlib(PayloadIsXz) <= 5.2-1" )
 
+# Verify exactly 1 RPM is in the path we expect
+set -- /home/$USER/rpmbuild/RPMS/noarch/*.rpm
+# shellcheck disable=SC1054
+[ $# -eq 1 ] || {{ echo "Expected 1 RPM, found $#"; exit 1; }}
+
 # shellcheck disable=SC2034
 mapfile -t actual_deps < <( rpm -qp /home/$USER/rpmbuild/RPMS/noarch/*.rpm --requires )
 # shellcheck disable=SC2154 disable=SC2145
-printf '%s\n' "${{actual_deps[@]}}"
+printf 'Dependency found: %s\n' "${{actual_deps[@]}}"
 
 # shellcheck disable=SC2154 disable=SC2145 disable=SC2034
-diff_deps=(`echo "${{expected_deps[@]}}" "${{actual_deps[@]}}" | tr ' ' '\n' | sort | uniq -u `)
+diff_deps=(`echo "${{expected_deps[@]}}" "${{actual_deps[@]}}" | tr ' ' '\n' | sort | uniq -u`)
 # shellcheck disable=SC2154 disable=SC2145 disable=SC2068 disable=SC2170 disable=SC1083
 if [ ${{#diff_deps[*]}} -eq 0 ]; then
     echo "RPM requirements are as expected"
 else
     echo "RPM requirements don't match the expected requirements"
     # shellcheck disable=SC2154 disable=SC2145
-    printf '%s\n' "${{diff_deps[@]}}"
+    printf 'Dependency mismatch: %s\n' ${{diff_deps[@]}}
     exit 1
 fi