Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use updater app instead of github agent app for merging into dev #4719

Merged
merged 3 commits into from
Aug 7, 2023
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
37 changes: 29 additions & 8 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1277,12 +1277,11 @@ steps:
settings:
config_json: |
{
"git_committer_name": "updater-for-ci[bot]",
"git_author_name": "updater-for-ci[bot]",
"git_committer_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
"git_author_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
"destination_branch": "master",
"pull_request_branch_prefix": "cd-agent",
"pull_request_enabled": false,
"pull_request_team_reviewers": [
"agent-squad"
],
"repo_name": "deployment_tools",
"update_jsonnet_attribute_configs": [
{
Expand All @@ -1302,8 +1301,12 @@ steps:
}
]
}
github_token:
from_secret: gh_token
github_app_id:
from_secret: updater_app_id
github_app_installation_id:
from_secret: updater_app_installation_id
github_app_private_key:
from_secret: updater_private_key
trigger:
ref:
- refs/heads/main
Expand Down Expand Up @@ -1450,7 +1453,25 @@ get:
kind: secret
name: private_key
---
get:
name: app-id
path: infra/data/ci/github/updater-app
kind: secret
name: updater_app_id
---
get:
name: app-installation-id
path: infra/data/ci/github/updater-app
kind: secret
name: updater_app_installation_id
---
get:
name: private-key
path: infra/data/ci/github/updater-app
kind: secret
name: updater_private_key
---
kind: signature
hmac: 2ff5f7f665aaba388e272316c0b7aee419801f347d882577dbbb84a95e4be672
hmac: 34d8fb10b7203bd97d29de3930322207cb5a5e618d5b7827af927e319b734ff5

...
13 changes: 7 additions & 6 deletions .drone/pipelines/publish.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,11 @@ linux_containers_jobs + windows_containers_jobs + [
settings: {
config_json: |||
{
"git_committer_name": "updater-for-ci[bot]",
"git_author_name": "updater-for-ci[bot]",
"git_committer_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
"git_author_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
"destination_branch": "master",
"pull_request_branch_prefix": "cd-agent",
"pull_request_enabled": false,
"pull_request_team_reviewers": [
"agent-squad"
],
"repo_name": "deployment_tools",
"update_jsonnet_attribute_configs": [
{
Expand All @@ -138,7 +137,9 @@ linux_containers_jobs + windows_containers_jobs + [
]
}
|||,
github_token: secrets.gh_token.fromSecret,
github_app_id: secrets.updater_app_id.fromSecret,
github_app_installation_id: secrets.updater_app_installation_id.fromSecret,
github_app_private_key: secrets.updater_private_key.fromSecret,
},
},
],
Expand Down
8 changes: 8 additions & 0 deletions .drone/util/secrets.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ local newSecret(name) = {
dockerconfigjson: newSecret('dockerconfigjson').getFrom(path='secret/data/common/gcr', name='.dockerconfigjson'),
gcr_admin: newSecret('gcr_admin').getFrom(path='infra/data/ci/gcr-admin', name='.dockerconfigjson'),
gh_token: newSecret('gh_token').getFrom(path='infra/data/ci/github/grafanabot', name='pat'),

// Agent Github App
private_key: newSecret('private_key').getFrom(path='infra/data/ci/agent/githubapp', name='private-key'),
app_id: newSecret('app_id').getFrom(path='infra/data/ci/agent/githubapp', name='app-id'),
app_installation_id: newSecret('app_installation_id').getFrom(path='infra/data/ci/agent/githubapp', name='app-installation-id'),

// Updater secrets for pushing to deployment_tools
updater_private_key: newSecret('updater_private_key').getFrom(path='infra/data/ci/github/updater-app', name='private-key'),
updater_app_id: newSecret('updater_app_id').getFrom(path='infra/data/ci/github/updater-app', name='app-id'),
updater_app_installation_id: newSecret('updater_app_installation_id').getFrom(path='infra/data/ci/github/updater-app', name='app-installation-id'),

gpg_public_key: newSecret('gpg_public_key').getFrom(path='infra/data/ci/packages-publish/gpg', name='public-key'),
gpg_private_key: newSecret('gpg_private_key').getFrom(path='infra/data/ci/packages-publish/gpg', name='private-key'),
gpg_passphrase: newSecret('gpg_passphrase').getFrom(path='infra/data/ci/packages-publish/gpg', name='passphrase'),
Expand Down