[v9.5.x] CI: Move npm token to Vault (#73409)

CI: Move npm token to Vault (#73407)

(cherry picked from commit c86a73c794)
This commit is contained in:
Horst Gutmann
2023-08-17 10:31:39 -05:00
committed by Kevin Minehart
parent 3d09fd09ef
commit 4c140fd26e
4 changed files with 18 additions and 3 deletions
+7 -1
View File
@@ -4376,6 +4376,12 @@ get:
kind: secret
name: azure_tenant
---
get:
name: token
path: infra/data/ci/grafana-release-eng/npm
kind: secret
name: npm_token
---
get:
name: public-key-b64
path: infra/data/ci/packages-publish/gpg
@@ -4491,6 +4497,6 @@ kind: secret
name: github_token
---
kind: signature
hmac: 911c16cdd96d4049c5fd8482d12c635786d91b17b94727d1798343c768a5d25b
hmac: 1d72ea139a1295b3f69ad037d977dda4837bf9f10f04067e994ebc018da10f51
...
+2 -1
View File
@@ -53,6 +53,7 @@ load(
"scripts/drone/vault.star",
"from_secret",
"gcp_upload_artifacts_key",
"npm_token",
"prerelease_bucket",
)
load(
@@ -122,7 +123,7 @@ def release_npm_packages_step():
],
"failure": "ignore",
"environment": {
"NPM_TOKEN": from_secret("npm_token"),
"NPM_TOKEN": from_secret(npm_token),
},
"commands": ["./bin/build artifacts npm release --tag ${DRONE_TAG}"],
}
+2 -1
View File
@@ -8,6 +8,7 @@ load(
"gcp_grafanauploads",
"gcp_grafanauploads_base64",
"gcp_upload_artifacts_key",
"npm_token",
"prerelease_bucket",
)
load(
@@ -1081,7 +1082,7 @@ def release_canary_npm_packages_step(trigger = None):
"image": images["build_image"],
"depends_on": end_to_end_tests_deps(),
"environment": {
"NPM_TOKEN": from_secret("npm_token"),
"NPM_TOKEN": from_secret(npm_token),
},
"commands": [
"./scripts/circle-release-canary-packages.sh",
+7
View File
@@ -17,6 +17,8 @@ rgm_destination = "destination"
rgm_github_token = "github_token"
rgm_dagger_token = "dagger_token"
npm_token = "npm_token"
def from_secret(secret):
return {"from_secret": secret}
@@ -64,6 +66,11 @@ def secrets():
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
"tenant_id",
),
vault_secret(
npm_token,
"infra/data/ci/grafana-release-eng/npm",
"token",
),
# Package publishing
vault_secret(
"packages_gpg_public_key",