6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
9 scripts_path=/builder/jjb/packaging
11 # A docker container must have been created by the build script
12 docker_id=$(sudo docker ps -qf name=build_rpm_epel)
14 sudo docker exec $docker_id /usr/bin/yum -y install curl expect nmap openssh
16 sudo docker exec $docker_id /bin/bash $scripts_path/test-rpm-deps.sh
18 sudo docker exec $docker_id /bin/bash $scripts_path/install-rpm.sh
20 sudo docker exec $docker_id /bin/bash $scripts_path/start-odl.sh
22 sudo docker exec $docker_id /bin/bash $scripts_path/test-ports-nofeature.sh
24 # Don't install test feature and check REST for Oxygen, ODLPARENT-139 breaks it
25 if [ "$STREAM" == "oxygen" ]; then
26 sudo docker exec $docker_id /usr/bin/expect $scripts_path/test-karaf-oxygensafe.expect
28 sudo docker exec $docker_id /usr/bin/expect $scripts_path/test-karaf.expect
29 sudo docker exec $docker_id /bin/bash $scripts_path/test-rest-ok.sh
32 sudo docker exec $docker_id /bin/bash $scripts_path/stop-odl.sh
34 sudo docker exec $docker_id /bin/bash $scripts_path/uninstall-rpm.sh
36 if [ "$SILO" == "sandbox" ]; then
37 echo "Not uploading RPMs to Nexus because running in sandbox"
38 elif [ "$SILO" == "releng" ]; then
39 RPM_NAME=$(sudo docker exec $docker_id find /root/rpmbuild/RPMS/noarch/ -wholename '*.rpm')
40 SRPM_NAME=$(sudo docker exec $docker_id find /root/rpmbuild/SRPMS/ -wholename '*.rpm')
41 UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
42 mkdir -p "$UPLOAD_FILES_PATH"
43 sudo docker cp $docker_id:$RPM_NAME "$_"
44 sudo docker cp $docker_id:$SRPM_NAME "$_"
46 echo "Unknown Jenkins silo: $SILO"