Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/scripts/configure-npm.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
# Point npm and Yarn at the internal JFrog npm registry.
# Reads JFROG_ACCESS_TOKEN from the environment (set by jfrog-oidc-token.sh).
#
# The token ends up in ~/.npmrc and ~/.yarnrc.yml. Yarn reads its user config
# only from the home folder, so the files cannot move to $RUNNER_TEMP. Every job
# that runs this script must end with an `if: always()` step that removes both.
set -euo pipefail

JFROG_NPM_REGISTRY="https://databricks.jfrog.io/artifactory/api/npm/db-npm/"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/create-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ jobs:
with:
name: databricks
path: "packages/databricks-vscode/*.vsix"

# configure-npm.sh wrote the JFrog token into these files. Remove them so
# the token does not outlive this job if the runner is ever reused.
- name: Remove JFrog npm credentials
if: always()
run: rm -f ~/.npmrc ~/.yarnrc.yml
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ jobs:
with:
name: VSIX artifacts
path: packages/databricks-vscode/artifacts

# configure-npm.sh wrote the JFrog token into these files. Remove them so
# the token does not outlive this job if the runner is ever reused.
- name: Remove JFrog npm credentials
if: always()
run: rm -f ~/.npmrc ~/.yarnrc.yml
6 changes: 6 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ jobs:
rm ${{ steps.create-changelog.outputs.changelog_file }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# configure-npm.sh wrote the JFrog token into these files. Remove them so
# the token does not outlive this job if the runner is ever reused.
- name: Remove JFrog npm credentials
if: always()
run: rm -f ~/.npmrc ~/.yarnrc.yml
6 changes: 6 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,9 @@ jobs:
- name: Python Unit Tests
run: yarn run test:python
working-directory: packages/databricks-vscode

# configure-npm.sh wrote the JFrog token into these files. Remove them so
# the token does not outlive this job if the runner is ever reused.
- name: Remove JFrog npm credentials
if: always()
run: rm -f ~/.npmrc ~/.yarnrc.yml
Loading