Skip to content

Commit d6acd95

Browse files
heschigopherbot
authored andcommitted
cmd/bootstrapswarm: use correct audience
The audience needs to follow the flag too. Change-Id: I23711cd18c598402ad876079ac525e8a53a5ae46 Reviewed-on: https://go-review.googlesource.com/c/build/+/520237 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Heschi Kreinick <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 30e8829 commit d6acd95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/bootstrapswarm/bootstrapswarm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func writeToWorkDirectory(b []byte, filename string) (string, error) {
154154

155155
// retrieveGCEVMToken retrieves a GCE VM token from the GCP metadata service.
156156
func retrieveGCEVMToken(ctx context.Context) (string, error) {
157-
const url = `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://chromium-swarm.appspot.com&format=full`
157+
url := "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://" + *swarming + "&format=full"
158158
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
159159
if err != nil {
160160
return "", fmt.Errorf("http.NewRequest: %w", err)

0 commit comments

Comments
 (0)