--- /dev/null
+#!/bin/bash
+
+# Options:
+# -x: Echo commands
+# -e: Fail on errors
+# -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Install ODL from .deb link or .repo url
+if [[ $URL == *.deb ]]
+then
+ sudo apt-get install -y "$URL"
+elif [[ $URL == ppa:* ]]
+then
+ sudo add-apt-repository "$REPO_FILE"
+ sudo apt-get update
+ sudo apt-get install -y opendaylight
+else
+ echo "URL is not a link to a PPA repo or .deb"
+fi
+
+# Install expect to interact with karaf shell
+sudo apt-get install -y expect
+
+# Start OpenDaylight
+sudo systemctl start opendaylight
+
+# Check status of OpenDaylight
+sudo systemctl status opendaylight
+
+# Get process id of Java
+pgrep java
- 'packaging-build-rpm-snap-{stream}'
- 'packaging-build-deb-{stream}'
- 'packaging-test-rpm-{stream}'
+ - 'packaging-test-deb-{stream}'
- 'packaging-test-puppet-{stream}'
- 'packaging-test-ansible-rpm-{stream}'
- 'packaging-test-ansible-deb-{stream}'
- archive-artifacts:
artifacts: '**'
+- job-template:
+ name: 'packaging-test-deb-{stream}'
+
+ node: ubuntu1604-mininet-ovs-25-2c-4g
+
+ parameters:
+ - opendaylight-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+ - string:
+ name: URL
+ # yamllint disable-line rule:line-length
+ default: 'http://download.opensuse.org/repositories/home:/akshitajha/xUbuntu_16.04/all/opendaylight_5.0.0-1_all.deb'
+ description: 'Link to .deb file'
+ - string:
+ name: REPO_FILE
+ default: 'ppa:odl-team/boron'
+ description: 'Name of the PPA repository'
+
+ scm:
+ - integration-gerrit-scm:
+ basedir: 'packaging'
+ refspec: '$GERRIT_REFSPEC'
+ branch: 'master'
+
+ wrappers:
+ - opendaylight-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ builders:
+ - shell: !include-raw: include-raw-test-deb.sh
+ - shell: !include-raw: include-raw-test-karaf.expect
+
+ publishers:
+ - archive-artifacts:
+ artifacts: '**'
+
- job-template:
name: 'packaging-test-ansible-rpm-{stream}'