Skip to content

Commit 729bce3

Browse files
lucian-tosafealebenpae
authored andcommitted
Use dynamically generated tokens for our public repo (#4102)
# Summary Our public repo didn't have a github app configured. Added one now so we need to use dynamically generated github tokens due to the ssh deprecation. ## Proof of Work https://spruce.mongodb.com/task/mongodb_enterprise_kubernetes_release_mcli_package_goreleaser_patch_80d6da01fe68171624a89660772a6c406578c5e3_67ae2cde4d6d4300074a9f50_25_02_13_17_33_20/logs?execution=1 ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [ ] Have you checked for release_note changes? ## Reminder (Please remove this when merging) - Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible - Our Short Guide for PRs: [Link](REDACTED) - Remember the following Communication Standards - use comment prefixes for clarity: * **blocking**: Must be addressed before approval. * **follow-up**: Can be addressed in a later PR or ticket. * **q**: Clarifying question. * **nit**: Non-blocking suggestions. * **note**: Side-note, non-actionable. Example: Praise * --> no prefix is considered a question
1 parent eda92ad commit 729bce3

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

public/.evergreen.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ functions:
3939
unzip -u macos-notary.zip
4040
chmod 755 ./linux_amd64/macnotary
4141
"release":
42+
- command: github.generate_token
43+
params:
44+
expansion_name: generated_token
4245
- command: shell.exec
4346
type: setup
4447
params:
4548
working_dir: src/github.com/mongodb/mongodb-enterprise-kubernetes/tools/multicluster
4649
include_expansions_in_env:
47-
- GITHUB_TOKEN
4850
- GRS_USERNAME
4951
- GRS_PASSWORD
5052
- PKCS11_URI
@@ -65,18 +67,19 @@ functions:
6567
set -Eeu pipefail
6668
6769
export PATH=$GOROOT/bin:$PATH
70+
export GITHUB_TOKEN=${generated_token}
6871
${workdir}/goreleaser release --rm-dist
6972
7073
tasks:
7174
- name: package_goreleaser
72-
git_tag_only: true
75+
allowed_requesters: [ "patch", "github_tag" ]
7376
tags: ["packaging"]
7477
commands:
7578
- func: "clone"
7679
- func: "install goreleaser"
7780
- func: "install macos notarization service"
7881
- func: "release"
79-
# add a noop task because if the only task in a variant is git_tag_only: true Evergreen doesn't start it at all
82+
# add a noop task because if the only task in a variant is git_tag_only: true Evergreen doesn't start it at all
8083
- name: noop
8184
commands:
8285
- command: shell.exec
@@ -85,11 +88,11 @@ tasks:
8588
script: echo "this is the noop task"
8689

8790
buildvariants:
88-
# This variant is run when a new tag is out similar to github actions.
89-
- name: release_mcli
90-
display_name: Release Go multi-cluster binary
91-
run_on:
92-
- ubuntu2204-small
93-
tasks:
94-
- name: package_goreleaser
95-
- name: noop
91+
# This variant is run when a new tag is out similar to github actions.
92+
- name: release_mcli
93+
display_name: Release Go multi-cluster binary
94+
run_on:
95+
- ubuntu2204-small
96+
tasks:
97+
- name: package_goreleaser
98+
- name: noop

0 commit comments

Comments
 (0)