X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fpackaging%2Fpackaging-macros.yaml;h=a7b93d0db4031f64424eb69b42d913767418c2dd;hb=0b020312fb41c7adb6da32214e65a57a3dd8f702;hp=57830eaea0109373c7f5158e8907c304c9482141;hpb=b4119213eb17b16ed5ca0b9672df9fc14b306a7f;p=releng%2Fbuilder.git diff --git a/jjb/packaging/packaging-macros.yaml b/jjb/packaging/packaging-macros.yaml index 57830eaea..a7b93d0db 100644 --- a/jjb/packaging/packaging-macros.yaml +++ b/jjb/packaging/packaging-macros.yaml @@ -1,22 +1,118 @@ # Integration/Packaging macros --- +- builder: + name: install-rpm + builders: + - shell: !include-raw: install-rpm.sh + +- builder: + name: install-repo-cfg-rpm + builders: + - shell: | + # shellcheck disable=SC2154 + repo_file="${REPO_CFG_FILE_URL##*/}" + sudo curl -s -o /etc/yum.repos.d/"$repo_file" "$REPO_CFG_FILE_URL" + +- builder: + name: start-odl + builders: + - shell: !include-raw: start-odl.sh + +- builder: + name: test-odl + builders: + - shell: | + # Install expect to interact with Karaf shell + # Install nmap to check status of ODL's SSH port + sudo yum install -y expect nmap + - shell: !include-raw: test-ports-nofeature.sh + - shell: !include-raw: test-karaf-oxygensafe.expect + # Disable this test until ODLPARENT-139 is fixed + # - shell: !include-raw: test-rest-ok.sh + +- builder: + name: stop-odl + builders: + - shell: !include-raw: stop-odl.sh + +- builder: + name: uninstall-rpm + builders: + - shell: !include-raw: uninstall-rpm.sh + +- builder: + name: upgrade-odl + builders: + - shell: | + sudo yum upgrade -y opendaylight + +- builder: + name: install-start-test-stop-rpm + builders: + - install-rpm + - start-odl + - test-odl + - stop-odl + +- builder: + name: install-start-test-stop-uninstall-rpm + builders: + - install-start-test-stop-rpm + - uninstall-rpm + +- builder: + name: installrepcfg-upgrade-start-test-stop-rpm + builders: + - install-repo-cfg-rpm + - upgrade-odl + - start-odl + - test-odl + - stop-odl + - builder: name: install-test-uninstall-rpm builders: - inject: - properties-content: 'URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm' - # Use *-escape to make double brace expansion work. JJB strangeness. - - shell: !include-raw: test-rpm-deps.sh - - shell: !include-raw-escape: install-rpm.sh - - shell: !include-raw: start-odl.sh + properties-content: "URL=/home/$USER/rpmbuild/RPMS/noarch/*.rpm" # Install deps needed interactive Karaf shell tests - shell: | # Install expect to interact with Karaf shell # Install nmap to check status of ODL's SSH port sudo yum install -y expect nmap - - shell: !include-raw: test-karaf.expect + - shell: !include-raw: test-rpm-deps.sh + - shell: !include-raw: install-rpm.sh + - shell: !include-raw: start-odl.sh + - shell: !include-raw: test-ports-nofeature.sh + - shell: !include-raw: test-karaf-oxygensafe.expect + # Disable this test until ODLPARENT-139 is fixed + # - shell: !include-raw: test-rest-ok.sh - shell: !include-raw: stop-odl.sh - shell: !include-raw: uninstall-rpm.sh - shell: | - # Remove old host key so future installs don't fail to SSH - rm /home/jenkins/.ssh/known_hosts + # Remove old host key (if exists) so future installs don't fail SSH + rm /home/jenkins/.ssh/known_hosts || \ + echo "No known_hosts file to clean up, which is fine" + +- builder: + name: install-test-uninstall-deb + builders: + - inject: + properties-content: "PACKAGE=$WORKSPACE/packaging/packages/deb/opendaylight/*.deb" + # Install deps needed interactive Karaf shell tests + - shell: | + # Install expect to interact with Karaf shell + # Install nmap to check status of ODL's SSH port + sudo apt-get install -y expect nmap + - shell: !include-raw: test-deb-deps.sh + - shell: !include-raw: install-deb.sh + - shell: !include-raw: start-odl.sh + - shell: !include-raw: test-ports-nofeature.sh + - shell: !include-raw: test-karaf-oxygensafe.expect + # Disable this test until ODLPARENT-139 is fixed + # - shell: !include-raw: test-rest-ok.sh + - shell: !include-raw: stop-odl.sh + - shell: !include-raw: uninstall-deb.sh + - shell: | + # Remove old host key (if exists) so future installs don't fail SSH + rm /home/jenkins/.ssh/known_hosts || \ + echo "No known_hosts file to clean up, which is fine"