diff --git a/.github/workflows/02-steampipe-db-image-build.yaml b/.github/workflows/02-steampipe-db-image-build.yaml index dadec64ca..54cffcb75 100644 --- a/.github/workflows/02-steampipe-db-image-build.yaml +++ b/.github/workflows/02-steampipe-db-image-build.yaml @@ -94,16 +94,16 @@ jobs: - name: Pull & Extract - linux amd64 run: |- EXTRACT_DIR=extracted-linux-amd64 - # new link (linux-amd64.txz) - https://drive.google.com/file/d/1CetXFMZZRAtkVr4gCTlcJcOfIm0wyyYn/view?usp=drive_link - curl -L -o linux-amd64.txz "https://drive.google.com/uc?export=download&id=1CetXFMZZRAtkVr4gCTlcJcOfIm0wyyYn" + # new link (linux-amd64.txz) - https://drive.google.com/file/d/17XnB7ipjnnDzvjAVAMCjvePRVyOvyiC-/view?usp=drive_link + curl -L -o linux-amd64.txz "https://drive.google.com/uc?export=download&id=17XnB7ipjnnDzvjAVAMCjvePRVyOvyiC-" mkdir $EXTRACT_DIR tar -xf linux-amd64.txz --directory $EXTRACT_DIR - name: Pull & Extract - linux arm64 run: |- EXTRACT_DIR=extracted-linux-arm64 - # new link (linux-arm64.txz) - https://drive.google.com/file/d/1ce43gJu8HPAufcsZEk87uFPyT6fGEair/view?usp=drive_link - curl -L -o linux-arm64.txz "https://drive.google.com/uc?export=download&id=1ce43gJu8HPAufcsZEk87uFPyT6fGEair" + # new link (linux-arm64.txz) - https://drive.google.com/file/d/1dBKin4bgTbbBSk7fToLnkNxWhixGIbtt/view?usp=drive_link + curl -L -o linux-arm64.txz "https://drive.google.com/uc?export=download&id=1dBKin4bgTbbBSk7fToLnkNxWhixGIbtt" mkdir $EXTRACT_DIR tar -xf linux-arm64.txz --directory $EXTRACT_DIR diff --git a/.github/workflows/12-test-post-release-linux-distros.yaml b/.github/workflows/12-test-post-release-linux-distros.yaml index dd7bca36a..478caef62 100644 --- a/.github/workflows/12-test-post-release-linux-distros.yaml +++ b/.github/workflows/12-test-post-release-linux-distros.yaml @@ -63,6 +63,52 @@ jobs: docker stop ubuntu-24-test docker rm ubuntu-24-test + smoke_test_ubuntu_22: + name: Smoke test (Ubuntu 22, x86_64) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Download Linux Release Artifact + run: | + mkdir -p ./artifacts + gh release download ${{ env.VERSION }} \ + --pattern "*linux_amd64.tar.gz" \ + --dir ./artifacts \ + --repo ${{ github.repository }} + # Rename to expected format + mv ./artifacts/*linux_amd64.tar.gz ./artifacts/linux.tar.gz + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + + - name: Pull Ubuntu latest Image + run: docker pull ubuntu:latest + + - name: Create and Start Ubuntu latest Container + run: | + docker run -d --name ubuntu-22-test -v ${{ github.workspace }}/artifacts:/artifacts -v ${{ github.workspace }}/scripts:/scripts ubuntu:22.04 tail -f /dev/null + + - name: Get runner/container info + run: | + docker exec ubuntu-22-test /scripts/linux_container_info.sh + + - name: Install dependencies, create user, and assign necessary permissions + run: | + docker exec ubuntu-22-test /scripts/prepare_ubuntu_container.sh + + - name: Run smoke tests + run: | + docker exec -u steampipe ubuntu-22-test /scripts/smoke_test.sh + + - name: Stop and Remove Container + run: | + docker stop ubuntu-22-test + docker rm ubuntu-22-test + smoke_test_centos_9: name: Smoke test (CentOS Stream 9, x86_64) runs-on: ubuntu-latest diff --git a/pkg/constants/db.go b/pkg/constants/db.go index 757709ed3..579156753 100644 --- a/pkg/constants/db.go +++ b/pkg/constants/db.go @@ -32,7 +32,7 @@ const ( // PostgresImageRef is the OCI Image ref for the database binaries PostgresImageRef = "ghcr.io/turbot/steampipe/db:14.19.0" - PostgresImageDigest = "sha256:42fd8972700e40565799ee5f4dc6a66afa146e0994ef9103c944f2b5f5adc43a" + PostgresImageDigest = "sha256:84264ef41853178707bccb091f5450c22e835f8a98f9961592c75690321093d9" FdwImageRef = "ghcr.io/turbot/steampipe/fdw:" + FdwVersion FdwBinaryFileName = "steampipe_postgres_fdw.so" diff --git a/scripts/smoke_test.sh b/scripts/smoke_test.sh index 3a1619184..c55300f45 100755 --- a/scripts/smoke_test.sh +++ b/scripts/smoke_test.sh @@ -1,26 +1,27 @@ #!/bin/sh # This is a script with set of commands to smoke test a steampipe build. # The plan is to gradually add more tests to this script. +set -e /usr/local/bin/steampipe --version # check version /usr/local/bin/steampipe query "select 1 as installed" # verify installation -/usr/local/bin/steampipe plugin install steampipe # verify plugin install +/usr/local/bin/steampipe plugin install net # verify plugin install /usr/local/bin/steampipe plugin list # verify plugin listings -/usr/local/bin/steampipe query "select name from steampipe_registry_plugin limit 10;" # verify simple query +/usr/local/bin/steampipe query "select issuer, not_after as exp_date from net_certificate where domain = 'steampipe.io';" # verify simple query -/usr/local/bin/steampipe plugin uninstall steampipe # verify plugin uninstall +/usr/local/bin/steampipe plugin uninstall net # verify plugin uninstall /usr/local/bin/steampipe plugin list # verify plugin listing after uninstalling -/usr/local/bin/steampipe plugin install steampipe # re-install for other tests +/usr/local/bin/steampipe plugin install net # re-install for other tests # the file path is different for darwin and linux if [ "$(uname -s)" = "Darwin" ]; then - /usr/local/bin/steampipe query "select name from steampipe_registry_plugin limit 1;" --export /Users/runner/query.sps # verify file export - cat /Users/runner/query.sps | jq '.end_time' # verify file created is readable + /usr/local/bin/steampipe query "select issuer, not_after as exp_date from net_certificate where domain = 'steampipe.io';" --export /Users/runner/query.sps # verify file export + jq '.end_time' /Users/runner/query.sps # verify file created is readable else - /usr/local/bin/steampipe query "select name from steampipe_registry_plugin limit 1;" --export /home/steampipe/query.sps # verify file export - cat /home/steampipe/query.sps | jq '.end_time' # verify file created is readable + /usr/local/bin/steampipe query "select issuer, not_after as exp_date from net_certificate where domain = 'steampipe.io';" --export /home/steampipe/query.sps # verify file export + jq '.end_time' /home/steampipe/query.sps # verify file created is readable fi # Ensure the log file path exists before trying to read it @@ -30,11 +31,11 @@ if [ "$(uname -s)" = "Darwin" ]; then fi # Verify log level in logfile -STEAMPIPE_LOG=info /usr/local/bin/steampipe query "select name from steampipe_registry_plugin limit 1;" +STEAMPIPE_LOG=info /usr/local/bin/steampipe query "select issuer, not_after as exp_date from net_certificate where domain = 'steampipe.io';" # Check if log file exists before attempting to cat it if ls $LOG_PATH 1> /dev/null 2>&1; then - bash -c "cat $LOG_PATH | grep '\[INFO\]'" + grep '\[INFO\]' $LOG_PATH else echo "Log file not found: $LOG_PATH" exit 1