diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87bde33ba90..b9052e8b8b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,25 +40,17 @@ jobs: - name: test deb package run: | - ls -l ./dist docker run --name debcontainer -it --detach jrei/systemd-debian:12 /bin/sh docker cp ./dist/tempo_*_linux_amd64.deb debcontainer:. - docker cp ./tools/packaging/wait-for-ready.sh debcontainer:. - docker exec debcontainer dpkg -i ./dist/tempo_*_linux_amd64.deb - docker exec debcontainer [ "$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) - docker exec debcontainer apt update && apt install -y curl - docker exec debcontainer ./wait-for-ready.sh) + docker cp ./tools/packaging/verify-deb-install.sh debcontainer:. + docker exec debcontainer ./verify-deb-install.sh - name: test rpm package run: | docker run --name rpmcontainer -it --detach jrei/systemd-centos:8 /bin/sh - docker cp ./dist/tempo*_amd64.rpm rpmcontainer:. - docker cp ./tools/packaging/wait-for-ready.sh rpmcontainer:. - docker exec rpmcontainer rpm --import https://packages.grafana.com/gpg.key - docker exec rpmcontainer rpm -i ./tempo*_amd64.rpm - docker exec rpmcontainer [ "$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) - docker exec rpmcontainer apt update && apt install -y curl - docker exec rpmcontainer ./wait-for-ready.sh) + docker cp ./dist/tempo_*_linux_amd64.rpm rpmcontainer:. + docker cp ./tools/packaging/verify-rpm-install.sh rpmcontainer:. + docker exec rpmcontainer ./verify-rpm-install.sh - name: release if: ${{ startsWith(github.ref, 'refs/tags/v') }} diff --git a/tools/packaging/verify-deb-install.sh b/tools/packaging/verify-deb-install.sh index 90c0cc41e3e..069f109f013 100755 --- a/tools/packaging/verify-deb-install.sh +++ b/tools/packaging/verify-deb-install.sh @@ -1,25 +1,11 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -euxo pipefail -docker ps -image="$(docker ps --filter ancestor=jrei/systemd-debian:12 --latest --format "{{.ID}}")" -echo "Running on container: ${image}" +# Install tempo and check it's running +dpkg -i ./tempo_*_linux_amd64.deb +[ "\$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) -dir="." -if [ -n "${CI}" ]; then - dir="/drone/src" -fi -echo "Running on directory: ${dir}" - -cat <