mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Merge branch 'v2.1.x' into develop
This commit is contained in:
58
.github/workflows/01-steampipe-release.yaml
vendored
58
.github/workflows/01-steampipe-release.yaml
vendored
@@ -196,7 +196,6 @@ jobs:
|
||||
with:
|
||||
repository: turbot/homebrew-tap
|
||||
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
ref: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Update live version
|
||||
if: steps.semver_parser.outputs.prerelease == ''
|
||||
@@ -263,3 +262,60 @@ jobs:
|
||||
git fetch --all
|
||||
gh pr merge $VERSION --squash --delete-branch
|
||||
git push origin --delete bump-brew
|
||||
|
||||
trigger_smoke_tests:
|
||||
name: Trigger Smoke Tests
|
||||
if: ${{ github.event.inputs.environment == 'Final (RC and final release)' }}
|
||||
needs: update_homebrew_tap
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Calculate version
|
||||
id: calculate_version
|
||||
run: |
|
||||
echo "VERSION=v${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Parse semver string
|
||||
id: semver_parser
|
||||
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 # v1.4.7
|
||||
with:
|
||||
input_string: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Trigger smoke test workflow
|
||||
if: steps.semver_parser.outputs.prerelease == ''
|
||||
run: |
|
||||
gh workflow run "12-test-post-release-linux-distros.yaml" \
|
||||
--ref ${{ github.ref }} \
|
||||
--field version=$VERSION \
|
||||
--repo ${{ github.repository }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
|
||||
- name: Get smoke test workflow run URL
|
||||
if: steps.semver_parser.outputs.prerelease == ''
|
||||
run: |
|
||||
echo "Waiting for smoke test workflow to start..."
|
||||
sleep 10
|
||||
|
||||
# Get the most recent run of the smoke test workflow
|
||||
RUN_ID=$(gh run list \
|
||||
--workflow="12-test-post-release-linux-distros.yaml" \
|
||||
--repo ${{ github.repository }} \
|
||||
--limit 1 \
|
||||
--json databaseId \
|
||||
--jq '.[0].databaseId')
|
||||
|
||||
if [ -n "$RUN_ID" ]; then
|
||||
WORKFLOW_URL="https://github.com/${{ github.repository }}/actions/runs/$RUN_ID"
|
||||
echo "✅ Smoke test workflow triggered successfully!"
|
||||
echo "🔗 Monitor progress at: $WORKFLOW_URL"
|
||||
echo ""
|
||||
echo "Workflow details:"
|
||||
echo " - Version: $VERSION"
|
||||
echo " - Workflow: 12-test-post-release-linux-distros.yaml"
|
||||
echo " - Run ID: $RUN_ID"
|
||||
else
|
||||
echo "⚠️ Could not retrieve workflow run ID. Check manually at:"
|
||||
echo "https://github.com/${{ github.repository }}/actions/workflows/12-test-post-release-linux-distros.yaml"
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: "02 - Steampipe: Smoke Tests"
|
||||
name: "12 - Test: Linux Distros (Post-release)"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -153,40 +153,49 @@ jobs:
|
||||
docker stop amazonlinux-2023-test
|
||||
docker rm amazonlinux-2023-test
|
||||
|
||||
smoke_test_darwin_arm64:
|
||||
name: Smoke test (macOS 14, ARM64)
|
||||
runs-on: macos-latest
|
||||
smoke_test_linux_arm64:
|
||||
name: Smoke test (Ubuntu 24, ARM64)
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Download Darwin Release Artifact
|
||||
- name: Download Linux Release Artifact
|
||||
run: |
|
||||
mkdir -p ./artifacts
|
||||
gh release download ${{ env.VERSION }} \
|
||||
--pattern "*darwin_arm64.zip" \
|
||||
--pattern "*linux_arm64.tar.gz" \
|
||||
--dir ./artifacts \
|
||||
--repo ${{ github.repository }}
|
||||
# Rename to expected format
|
||||
mv ./artifacts/*darwin_arm64.zip ./artifacts/darwin.zip
|
||||
mv ./artifacts/*linux_arm64.tar.gz ./artifacts/linux.tar.gz
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract Darwin Artifacts and Install Binary
|
||||
- name: Extract Linux Artifacts and Install Binary
|
||||
run: |
|
||||
sudo unzip ./artifacts/darwin.zip -d /usr/local/bin
|
||||
sudo tar -xzf ./artifacts/linux.tar.gz -C /usr/local/bin
|
||||
sudo chmod +x /usr/local/bin/steampipe
|
||||
|
||||
- name: Install jq
|
||||
run: |
|
||||
brew install jq
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y jq
|
||||
|
||||
- name: Create steampipe user and setup environment
|
||||
run: |
|
||||
sudo useradd -m steampipe
|
||||
sudo mkdir -p /home/steampipe/.steampipe/logs
|
||||
sudo chown -R steampipe:steampipe /home/steampipe
|
||||
|
||||
- name: Get runner/container info
|
||||
run: |
|
||||
uname -a
|
||||
sw_vers
|
||||
cat /etc/os-release
|
||||
|
||||
- name: Run smoke tests
|
||||
run: |
|
||||
chmod +x $GITHUB_WORKSPACE/scripts/smoke_test.sh
|
||||
$GITHUB_WORKSPACE/scripts/smoke_test.sh
|
||||
sudo cp $GITHUB_WORKSPACE/scripts/smoke_test.sh /home/steampipe/smoke_test.sh
|
||||
sudo chown steampipe:steampipe /home/steampipe/smoke_test.sh
|
||||
sudo -u steampipe /home/steampipe/smoke_test.sh
|
||||
Reference in New Issue
Block a user