Skip to content

Conversation

@andrewnester
Copy link
Contributor

@andrewnester andrewnester commented Nov 5, 2025

Changes

Automatically sign CLI binary using Goreleaser

Why

Currently, it's a manual process; we want it to be automatic

Tests

Successful dry-run is here: https://github.com/databricks/cli/actions/runs/19235669891/job/54984805490

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Nov 5, 2025

Run: 19236141613

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip
💚​ aws linux 1 1 356 602
💚​ aws windows 1 1 357 601
💚​ aws-ucws windows 1 1 492 492
💚​ azure linux 1 1 356 601
💚​ azure windows 1 1 357 600
🔄​ gcp linux 4 1 1 351 603
6 failing tests:
Test Name aws linux aws windows aws-ucws windows azure linux azure windows gcp linux
TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
TestAccept/bundle/run/app-with-job 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct/DLT=no/NBOOK=no/PY=no ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct/DLT=no/NBOOK=no/PY=yes ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct/DLT=no/NBOOK=yes/PY=no ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=yes ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f

with:
packages-dir: experimental/python/dist

publish-to-winget-pkgs:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action moved from publish-winget.yml which was previously manually triggered, now it triggered automatically after goreleaser succeeds.

urls=$(
gh api https://api.github.com/repos/databricks/cli/releases/tags/${{ github.ref_name }} | \
jq -r .assets[].browser_download_url | \
grep -E '_windows_.*\.zip$' | \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change it used to search for -signed suffixed archives, but nowthe default named archive for windows is already signed

-p ${{ secrets.DECO_SIGN_AZURE_CLIENT_SECRET }} \
--tenant ${{ secrets.DECO_SIGN_AZURE_TENANT_ID }}
ACCESS_TOKEN=$(az account get-access-token --resource https://vault.azure.net --query accessToken -o tsv)
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to mark this as secret/sensitive as well.

hooks:
post:
- sh -c 'if [ "{{ .Os }}" = "windows" ]; then java -jar /tmp/jsign.jar --storetype AZUREKEYVAULT --keystore "${AZURE_KEY_VAULT_NAME}" --storepass "${ACCESS_TOKEN}" --alias "${AZURE_CERTIFICATE_NAME}" --tsaurl http://timestamp.digicert.com "{{ .Path }}"; fi'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit finicky. Is this the recommended approach with goreleaser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants