CI: Use GCP keys in vault and not drone secrets (#72023)
This commit is contained in:
@@ -5,6 +5,9 @@ This module is a library of Drone steps and other pipeline components.
|
||||
load(
|
||||
"scripts/drone/vault.star",
|
||||
"from_secret",
|
||||
"gcp_grafanauploads",
|
||||
"gcp_grafanauploads_base64",
|
||||
"gcp_upload_artifacts_key",
|
||||
"prerelease_bucket",
|
||||
)
|
||||
load(
|
||||
@@ -330,7 +333,7 @@ def store_storybook_step(ver_mode, trigger = None):
|
||||
] +
|
||||
end_to_end_tests_deps(),
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
"PRERELEASE_BUCKET": from_secret(prerelease_bucket),
|
||||
},
|
||||
"commands": commands,
|
||||
@@ -369,7 +372,7 @@ def e2e_tests_artifacts():
|
||||
],
|
||||
},
|
||||
"environment": {
|
||||
"GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY": from_secret("gcp_upload_artifacts_key"),
|
||||
"GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY": from_secret(gcp_upload_artifacts_key),
|
||||
"E2E_TEST_ARTIFACTS_BUCKET": "releng-pipeline-artifacts-dev",
|
||||
"GITHUB_TOKEN": from_secret("github_token"),
|
||||
},
|
||||
@@ -407,7 +410,7 @@ def upload_cdn_step(ver_mode, trigger = None):
|
||||
"grafana-server",
|
||||
],
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
"PRERELEASE_BUCKET": from_secret(prerelease_bucket),
|
||||
},
|
||||
"commands": [
|
||||
@@ -954,7 +957,7 @@ def build_docker_images_step(archs = None, ubuntu = False, publish = False):
|
||||
cmd += " -archs {}".format(",".join(archs))
|
||||
|
||||
environment = {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -974,7 +977,7 @@ def fetch_images_step():
|
||||
"name": "fetch-images",
|
||||
"image": images["cloudsdk_image"],
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
"DOCKER_USER": from_secret("docker_username"),
|
||||
"DOCKER_PASSWORD": from_secret("docker_password"),
|
||||
},
|
||||
@@ -1001,7 +1004,7 @@ def publish_images_step(ver_mode, docker_repo, trigger = None):
|
||||
docker_repo = "grafana/{}".format(docker_repo)
|
||||
|
||||
environment = {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
"DOCKER_USER": from_secret("docker_username"),
|
||||
"DOCKER_PASSWORD": from_secret("docker_password"),
|
||||
"GITHUB_APP_ID": from_secret("delivery-bot-app-id"),
|
||||
@@ -1177,7 +1180,7 @@ def upload_packages_step(ver_mode, trigger = None):
|
||||
"image": images["publish_image"],
|
||||
"depends_on": end_to_end_tests_deps(),
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads_base64),
|
||||
"PRERELEASE_BUCKET": from_secret("prerelease_bucket"),
|
||||
},
|
||||
"commands": [
|
||||
@@ -1219,7 +1222,7 @@ def publish_grafanacom_step(ver_mode):
|
||||
],
|
||||
"environment": {
|
||||
"GRAFANA_COM_API_KEY": from_secret("grafana_api_key"),
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads),
|
||||
},
|
||||
"commands": [
|
||||
cmd,
|
||||
@@ -1368,7 +1371,7 @@ def get_windows_steps(ver_mode, bucket = "%PRERELEASE_BUCKET%", edition = "oss")
|
||||
"windows-init",
|
||||
],
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret("gcp_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads_base64),
|
||||
"PRERELEASE_BUCKET": from_secret(prerelease_bucket),
|
||||
"GITHUB_TOKEN": from_secret("github_token"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user