Simplify autorelease to not use release tags
[releng/builder.git] / jjb / packaging / include-raw-test-rpm.sh
1 #!/bin/bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 #   -o pipefail: Fail on errors in scripts this calls, give stacktrace
7 set -ex -o pipefail
8
9 # Install ODL from .rpm link or .repo url
10 if [[ $URL == *.rpm ]]
11 then
12   sudo yum install -y "$URL"
13 elif [[ $URL == *.repo ]]
14 then
15   # shellcheck disable=SC2154
16   repo_file="${{URL##*/}}"
17   sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
18   sudo yum install -y opendaylight
19 else
20   echo "URL is not a link to .rpm or .repo"
21   exit 1
22 fi
23
24 # Start OpenDaylight
25 sudo systemctl start opendaylight
26
27 # Check status of OpenDaylight
28 sudo systemctl status opendaylight
29
30 # Get process id of Java
31 pgrep java
32
33 # Install expect to interact with karaf shell
34 sudo yum install -y expect