Skip to content

Commit 94a2a81

Browse files
committed
ci(audit-storage): onboard to testing-isolation
Use ID_TOKEN from custard testing environment and set audience when deploying to Cloud Run
1 parent 5989107 commit 94a2a81

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env" : {
3+
"SERVICE_NAME" : "eventarc-audit-storage",
4+
"CONTAINER_IMAGE" : "gcr.io/${PROJECT_ID}/run-${SERVICE_NAME}-${RUN_ID}"
5+
}
6+
}

eventarc/audit-storage/test/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ gcloud run deploy "${SERVICE_NAME}" \
3535
--region="${REGION:-us-central1}" \
3636
${FLAGS} \
3737
--platform=managed \
38+
--add-custom-audiences="https://action.test/" \
3839
--quiet
3940
set +x
4041

eventarc/audit-storage/test/runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ requireEnv() {
2020
test "${!1}" || (echo "Environment Variable '$1' not found" && exit 1)
2121
}
2222
requireEnv SERVICE_NAME
23+
requireEnv ID_TOKEN
2324

2425
echo '---'
2526
test/deploy.sh
@@ -40,7 +41,6 @@ function cleanup {
4041
trap cleanup EXIT
4142

4243
# TODO: Perform authentication inside the test.
43-
export ID_TOKEN=$(gcloud auth print-identity-token)
4444
export BASE_URL=$(test/url.sh)
4545

4646
test -z "$BASE_URL" && echo "BASE_URL value is empty" && exit 1

0 commit comments

Comments
 (0)