2023-01-30 03:27:11 -06:00
|
|
|
"""
|
|
|
|
This module returns functions for generating Drone secrets fetched from Vault.
|
|
|
|
"""
|
|
|
|
pull_secret = "dockerconfigjson"
|
|
|
|
drone_token = "drone_token"
|
|
|
|
prerelease_bucket = "prerelease_bucket"
|
|
|
|
gcp_upload_artifacts_key = "gcp_upload_artifacts_key"
|
2023-07-21 08:53:57 -05:00
|
|
|
gcp_grafanauploads = "gcp_grafanauploads"
|
|
|
|
gcp_grafanauploads_base64 = "gcp_grafanauploads_base64"
|
2023-07-11 06:08:05 -05:00
|
|
|
gcp_download_build_container_assets_key = "gcp_download_build_container_assets_key"
|
2023-01-30 03:27:11 -06:00
|
|
|
azure_sp_app_id = "azure_sp_app_id"
|
|
|
|
azure_sp_app_pw = "azure_sp_app_pw"
|
|
|
|
azure_tenant = "azure_tenant"
|
2022-12-07 01:13:57 -06:00
|
|
|
|
2023-05-03 13:56:02 -05:00
|
|
|
rgm_gcp_key_base64 = "gcp_key_base64"
|
|
|
|
rgm_destination = "destination"
|
|
|
|
rgm_github_token = "github_token"
|
2023-05-17 12:19:53 -05:00
|
|
|
rgm_dagger_token = "dagger_token"
|
2023-05-03 13:56:02 -05:00
|
|
|
|
2021-05-12 08:30:05 -05:00
|
|
|
def from_secret(secret):
|
2023-01-30 03:27:11 -06:00
|
|
|
return {"from_secret": secret}
|
2021-05-12 08:30:05 -05:00
|
|
|
|
|
|
|
def vault_secret(name, path, key):
|
|
|
|
return {
|
2023-01-30 03:27:11 -06:00
|
|
|
"kind": "secret",
|
|
|
|
"name": name,
|
|
|
|
"get": {
|
|
|
|
"path": path,
|
|
|
|
"name": key,
|
2022-12-07 01:13:57 -06:00
|
|
|
},
|
2021-05-12 08:30:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
def secrets():
|
|
|
|
return [
|
2023-07-21 08:53:57 -05:00
|
|
|
vault_secret(gcp_grafanauploads, "infra/data/ci/grafana-release-eng/grafanauploads", "credentials.json"),
|
|
|
|
vault_secret(gcp_grafanauploads_base64, "infra/data/ci/grafana-release-eng/grafanauploads", "credentials_base64"),
|
2023-07-19 15:40:03 -05:00
|
|
|
vault_secret("grafana_api_key", "infra/data/ci/drone-plugins", "grafana_api_key"),
|
2023-01-30 03:27:11 -06:00
|
|
|
vault_secret(pull_secret, "secret/data/common/gcr", ".dockerconfigjson"),
|
|
|
|
vault_secret("github_token", "infra/data/ci/github/grafanabot", "pat"),
|
|
|
|
vault_secret(drone_token, "infra/data/ci/drone", "machine-user-token"),
|
|
|
|
vault_secret(prerelease_bucket, "infra/data/ci/grafana/prerelease", "bucket"),
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
|
|
|
gcp_upload_artifacts_key,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/grafana/releng/artifacts-uploader-service-account",
|
|
|
|
"credentials.json",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2023-07-11 06:08:05 -05:00
|
|
|
vault_secret(
|
|
|
|
gcp_download_build_container_assets_key,
|
|
|
|
"infra/data/ci/grafana/assets-downloader-build-container-service-account",
|
|
|
|
"credentials.json",
|
|
|
|
),
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
|
|
|
azure_sp_app_id,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"application_id",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
azure_sp_app_pw,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"application_secret",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
azure_tenant,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"tenant_id",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2022-09-01 06:13:44 -05:00
|
|
|
# Package publishing
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_public_key",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"public-key-b64",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_private_key",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"private-key-b64",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_passphrase",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"passphrase",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_service_account",
|
|
|
|
"infra/data/ci/packages-publish/service-account",
|
|
|
|
"credentials.json",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_access_key_id",
|
|
|
|
"infra/data/ci/packages-publish/bucket-credentials",
|
|
|
|
"AccessID",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_secret_access_key",
|
|
|
|
"infra/data/ci/packages-publish/bucket-credentials",
|
|
|
|
"Secret",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2023-03-09 07:07:42 -06:00
|
|
|
vault_secret(
|
|
|
|
"static_asset_editions",
|
|
|
|
"infra/data/ci/grafana-release-eng/artifact-publishing",
|
|
|
|
"static_asset_editions",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
"enterprise2-cdn-path",
|
|
|
|
"infra/data/ci/grafana-release-eng/enterprise2",
|
|
|
|
"cdn_path",
|
|
|
|
),
|
2023-05-03 13:56:02 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_gcp_key_base64,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
2023-07-28 09:58:22 -05:00
|
|
|
"gcp_service_account_prod_base64",
|
2023-05-03 13:56:02 -05:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
rgm_destination,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
2023-07-28 09:58:22 -05:00
|
|
|
"destination_prod",
|
2023-05-03 13:56:02 -05:00
|
|
|
),
|
2023-05-17 12:19:53 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_dagger_token,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
|
|
|
"dagger_token",
|
|
|
|
),
|
2023-05-03 13:56:02 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_github_token,
|
|
|
|
"infra/data/ci/github/grafanabot",
|
|
|
|
"pat",
|
|
|
|
),
|
2023-05-15 08:33:31 -05:00
|
|
|
# grafana-delivery-bot secrets
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-id",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-id",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-installation-id",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-installation-id",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-private-key",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-private-key",
|
|
|
|
),
|
2021-05-12 08:30:05 -05:00
|
|
|
]
|