Skip to content

Commit 5116aa3

Browse files
mattdurhamclayton-cornell
authored andcommitted
Use updater app instead of github agent app for merging into dev (#4719)
* Use updater app instead of github agent app for merging into deployment_tools. * Fix key names * Fix key names in drone.yml
1 parent 5821e57 commit 5116aa3

File tree

3 files changed

+44
-14
lines changed

3 files changed

+44
-14
lines changed

.drone/drone.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,12 +1277,11 @@ steps:
12771277
settings:
12781278
config_json: |
12791279
{
1280+
"git_committer_name": "updater-for-ci[bot]",
1281+
"git_author_name": "updater-for-ci[bot]",
1282+
"git_committer_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
1283+
"git_author_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
12801284
"destination_branch": "master",
1281-
"pull_request_branch_prefix": "cd-agent",
1282-
"pull_request_enabled": false,
1283-
"pull_request_team_reviewers": [
1284-
"agent-squad"
1285-
],
12861285
"repo_name": "deployment_tools",
12871286
"update_jsonnet_attribute_configs": [
12881287
{
@@ -1302,8 +1301,12 @@ steps:
13021301
}
13031302
]
13041303
}
1305-
github_token:
1306-
from_secret: gh_token
1304+
github_app_id:
1305+
from_secret: updater_app_id
1306+
github_app_installation_id:
1307+
from_secret: updater_app_installation_id
1308+
github_app_private_key:
1309+
from_secret: updater_private_key
13071310
trigger:
13081311
ref:
13091312
- refs/heads/main
@@ -1450,7 +1453,25 @@ get:
14501453
kind: secret
14511454
name: private_key
14521455
---
1456+
get:
1457+
name: app-id
1458+
path: infra/data/ci/github/updater-app
1459+
kind: secret
1460+
name: updater_app_id
1461+
---
1462+
get:
1463+
name: app-installation-id
1464+
path: infra/data/ci/github/updater-app
1465+
kind: secret
1466+
name: updater_app_installation_id
1467+
---
1468+
get:
1469+
name: private-key
1470+
path: infra/data/ci/github/updater-app
1471+
kind: secret
1472+
name: updater_private_key
1473+
---
14531474
kind: signature
1454-
hmac: 2ff5f7f665aaba388e272316c0b7aee419801f347d882577dbbb84a95e4be672
1475+
hmac: 34d8fb10b7203bd97d29de3930322207cb5a5e618d5b7827af927e319b734ff5
14551476

14561477
...

.drone/pipelines/publish.jsonnet

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@ linux_containers_jobs + windows_containers_jobs + [
112112
settings: {
113113
config_json: |||
114114
{
115+
"git_committer_name": "updater-for-ci[bot]",
116+
"git_author_name": "updater-for-ci[bot]",
117+
"git_committer_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
118+
"git_author_email": "119986603+updater-for-ci[bot]@users.noreply.github.com",
115119
"destination_branch": "master",
116-
"pull_request_branch_prefix": "cd-agent",
117-
"pull_request_enabled": false,
118-
"pull_request_team_reviewers": [
119-
"agent-squad"
120-
],
121120
"repo_name": "deployment_tools",
122121
"update_jsonnet_attribute_configs": [
123122
{
@@ -138,7 +137,9 @@ linux_containers_jobs + windows_containers_jobs + [
138137
]
139138
}
140139
|||,
141-
github_token: secrets.gh_token.fromSecret,
140+
github_app_id: secrets.updater_app_id.fromSecret,
141+
github_app_installation_id: secrets.updater_app_installation_id.fromSecret,
142+
github_app_private_key: secrets.updater_private_key.fromSecret,
142143
},
143144
},
144145
],

.drone/util/secrets.jsonnet

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ local newSecret(name) = {
1313
dockerconfigjson: newSecret('dockerconfigjson').getFrom(path='secret/data/common/gcr', name='.dockerconfigjson'),
1414
gcr_admin: newSecret('gcr_admin').getFrom(path='infra/data/ci/gcr-admin', name='.dockerconfigjson'),
1515
gh_token: newSecret('gh_token').getFrom(path='infra/data/ci/github/grafanabot', name='pat'),
16+
17+
// Agent Github App
1618
private_key: newSecret('private_key').getFrom(path='infra/data/ci/agent/githubapp', name='private-key'),
1719
app_id: newSecret('app_id').getFrom(path='infra/data/ci/agent/githubapp', name='app-id'),
1820
app_installation_id: newSecret('app_installation_id').getFrom(path='infra/data/ci/agent/githubapp', name='app-installation-id'),
21+
22+
// Updater secrets for pushing to deployment_tools
23+
updater_private_key: newSecret('updater_private_key').getFrom(path='infra/data/ci/github/updater-app', name='private-key'),
24+
updater_app_id: newSecret('updater_app_id').getFrom(path='infra/data/ci/github/updater-app', name='app-id'),
25+
updater_app_installation_id: newSecret('updater_app_installation_id').getFrom(path='infra/data/ci/github/updater-app', name='app-installation-id'),
26+
1927
gpg_public_key: newSecret('gpg_public_key').getFrom(path='infra/data/ci/packages-publish/gpg', name='public-key'),
2028
gpg_private_key: newSecret('gpg_private_key').getFrom(path='infra/data/ci/packages-publish/gpg', name='private-key'),
2129
gpg_passphrase: newSecret('gpg_passphrase').getFrom(path='infra/data/ci/packages-publish/gpg', name='passphrase'),

0 commit comments

Comments
 (0)