* 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
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}
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
# 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
# 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"
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'
"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