mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Merge branch 'v2.1.x' into develop (#4618)
This commit is contained in:
@@ -150,6 +150,7 @@ jobs:
|
||||
- name: Push to Registry
|
||||
run: |-
|
||||
REF="$CORE_REPO/$IMAGE_NAME:$VERSION"
|
||||
LATEST_REF="$CORE_REPO/$IMAGE_NAME:latest"
|
||||
|
||||
oras push $REF \
|
||||
--config config.json:application/vnd.turbot.steampipe.config.v1+json \
|
||||
@@ -158,3 +159,11 @@ jobs:
|
||||
extracted-darwin-arm64:application/vnd.turbot.steampipe.db.darwin-arm64.layer.v1+tar \
|
||||
extracted-linux-amd64:application/vnd.turbot.steampipe.db.linux-amd64.layer.v1+tar \
|
||||
extracted-linux-arm64:application/vnd.turbot.steampipe.db.linux-arm64.layer.v1+tar
|
||||
|
||||
# check if the version is NOT an rc version before tagging as latest
|
||||
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Tagging as latest: $LATEST_REF"
|
||||
oras tag $REF latest
|
||||
else
|
||||
echo "Skipping latest tag for rc version: $VERSION"
|
||||
fi
|
||||
|
||||
@@ -13,6 +13,8 @@ env:
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
# Disable update checks during smoke tests
|
||||
STEAMPIPE_UPDATE_CHECK: false
|
||||
# Slack webhook URL for notifications
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.PIPELING_RELEASE_BOT_WEBHOOK_URL }}
|
||||
|
||||
jobs:
|
||||
smoke_test_ubuntu_24:
|
||||
@@ -199,3 +201,35 @@ jobs:
|
||||
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
|
||||
|
||||
notify_completion:
|
||||
name: Notify completion
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
[
|
||||
smoke_test_ubuntu_24,
|
||||
smoke_test_centos_9,
|
||||
smoke_test_amazonlinux,
|
||||
smoke_test_linux_arm64,
|
||||
]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check results and notify
|
||||
run: |
|
||||
# Check if all jobs succeeded
|
||||
UBUNTU_24_RESULT="${{ needs.smoke_test_ubuntu_24.result }}"
|
||||
CENTOS_9_RESULT="${{ needs.smoke_test_centos_9.result }}"
|
||||
AMAZONLINUX_RESULT="${{ needs.smoke_test_amazonlinux.result }}"
|
||||
ARM64_RESULT="${{ needs.smoke_test_linux_arm64.result }}"
|
||||
|
||||
WORKFLOW_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
|
||||
if [ "$UBUNTU_24_RESULT" = "success" ] && [ "$CENTOS_9_RESULT" = "success" ] && [ "$AMAZONLINUX_RESULT" = "success" ] && [ "$ARM64_RESULT" = "success" ]; then
|
||||
MESSAGE="✅ Steampipe ${{ env.VERSION }} smoke tests passed!\n\n🔗 View details: $WORKFLOW_URL"
|
||||
else
|
||||
MESSAGE="❌ Steampipe ${{ env.VERSION }} smoke tests failed!\n\n🔗 View details: $WORKFLOW_URL"
|
||||
fi
|
||||
|
||||
curl -X POST -H 'Content-type: application/json' \
|
||||
--data "{\"text\":\"$MESSAGE\"}" \
|
||||
${{ env.SLACK_WEBHOOK_URL }}
|
||||
|
||||
@@ -12,8 +12,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
pfilepaths "github.com/turbot/pipe-fittings/v2/filepaths"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/mattn/go-isatty"
|
||||
@@ -24,6 +22,7 @@ import (
|
||||
"github.com/turbot/pipe-fittings/v2/app_specific"
|
||||
pconstants "github.com/turbot/pipe-fittings/v2/constants"
|
||||
perror_helpers "github.com/turbot/pipe-fittings/v2/error_helpers"
|
||||
pfilepaths "github.com/turbot/pipe-fittings/v2/filepaths"
|
||||
"github.com/turbot/pipe-fittings/v2/parse"
|
||||
"github.com/turbot/pipe-fittings/v2/pipes"
|
||||
"github.com/turbot/pipe-fittings/v2/utils"
|
||||
@@ -243,6 +242,9 @@ func initGlobalConfig() perror_helpers.ErrorAndWarnings {
|
||||
SetDefaultsFromConfig(loader.ConfiguredProfile.ConfigMap(cmd))
|
||||
}
|
||||
|
||||
// now env vars have been processed, set PipesInstallDir
|
||||
pfilepaths.PipesInstallDir = viper.GetString(pconstants.ArgPipesInstallDir)
|
||||
|
||||
// NOTE: we need to resolve the token separately
|
||||
// - that is because we need the resolved value of ArgPipesHost in order to load any saved token
|
||||
// and we cannot get this until the other config has been resolved
|
||||
@@ -392,7 +394,6 @@ func createLogger(logBuffer *bytes.Buffer, cmd *cobra.Command) {
|
||||
}
|
||||
|
||||
func ensureInstallDir() {
|
||||
pipesInstallDir := viper.GetString(pconstants.ArgPipesInstallDir)
|
||||
installDir := viper.GetString(pconstants.ArgInstallDir)
|
||||
|
||||
log.Printf("[TRACE] ensureInstallDir %s", installDir)
|
||||
@@ -402,15 +403,8 @@ func ensureInstallDir() {
|
||||
error_helpers.FailOnErrorWithMessage(err, fmt.Sprintf("could not create installation directory: %s", installDir))
|
||||
}
|
||||
|
||||
if _, err := os.Stat(pipesInstallDir); os.IsNotExist(err) {
|
||||
log.Printf("[TRACE] creating install dir")
|
||||
err = os.MkdirAll(pipesInstallDir, 0755)
|
||||
error_helpers.FailOnErrorWithMessage(err, fmt.Sprintf("could not create pipes installation directory: %s", pipesInstallDir))
|
||||
}
|
||||
|
||||
// store as app_specific.InstallDir and PipesInstallDir
|
||||
// store as app_specific.InstallDir
|
||||
app_specific.InstallDir = installDir
|
||||
pfilepaths.PipesInstallDir = pipesInstallDir
|
||||
}
|
||||
|
||||
// displayDeprecationWarnings shows the deprecated warnings in a formatted way
|
||||
|
||||
@@ -152,6 +152,7 @@ func setDefaultsFromEnv() {
|
||||
constants.EnvUpdateCheck: {[]string{pconstants.ArgUpdateCheck}, Bool},
|
||||
constants.EnvPipesHost: {[]string{pconstants.ArgPipesHost}, String},
|
||||
constants.EnvPipesToken: {[]string{pconstants.ArgPipesToken}, String},
|
||||
constants.EnvPipesInstallDir: {[]string{pconstants.ArgPipesInstallDir}, String},
|
||||
constants.EnvSnapshotLocation: {[]string{pconstants.ArgSnapshotLocation}, String},
|
||||
constants.EnvWorkspaceDatabase: {[]string{pconstants.ArgWorkspaceDatabase}, String},
|
||||
constants.EnvServicePassword: {[]string{pconstants.ArgServicePassword}, String},
|
||||
|
||||
@@ -18,6 +18,7 @@ const (
|
||||
|
||||
EnvPipesHost = "PIPES_HOST"
|
||||
EnvPipesToken = "PIPES_TOKEN"
|
||||
EnvPipesInstallDir = "PIPES_INSTALL_DIR"
|
||||
|
||||
EnvDisplayWidth = "STEAMPIPE_DISPLAY_WIDTH"
|
||||
EnvCacheEnabled = "STEAMPIPE_CACHE"
|
||||
|
||||
Reference in New Issue
Block a user