File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ CWD="$(pwd)"
44
55source scripts/set-default-credentials.sh
66
7- TARGET_FILE=" ${COMMIT_SHA} -${CI_JOB_ID} .txt"
7+ RUN_SUFFIX=" ${GITHUB_RUN_NUMBER:- $RANDOM } -${RUNNER_OS:- linux} -${RANDOM} "
8+ TARGET_FILE=" ${COMMIT_SHA} -${RUN_SUFFIX} .txt"
89
910echo " Running in ${CWD} "
1011echo " Running with node: $( which node) "
@@ -105,7 +106,7 @@ kill_port "5000"
105106echo " Tested local hosting emulator."
106107
107108echo " Testing hosting deployment..."
108- firebase hosting:channel:deploy --non-interactive --expires 1h --project " ${FBTOOLS_TARGET_PROJECT} " --json " ${GITHUB_RUN_NUMBER }" | tee channeldeploy.json
109+ firebase hosting:channel:deploy --non-interactive --expires 1h --project " ${FBTOOLS_TARGET_PROJECT} " --json " channel- ${RUN_SUFFIX }" | tee channeldeploy.json
109110URL=$( cat channeldeploy.json | jq -r " .result.\" ${FBTOOLS_TARGET_PROJECT} \" .url" )
110111sleep 12
111112VALUE=" $( curl $URL /${TARGET_FILE} ) "
@@ -161,7 +162,7 @@ echo "Initialized second temp directory."
161162# echo "Tested hosting deployment by target."
162163
163164echo " Testing hosting channel deployment by target..."
164- firebase hosting:channel:deploy " targetchannel-${GITHUB_RUN_NUMBER } " --only customtarget --project " ${FBTOOLS_TARGET_PROJECT} " --non-interactive --json | tee output.json
165+ firebase hosting:channel:deploy " targetchannel-${RUN_SUFFIX } " --only customtarget --project " ${FBTOOLS_TARGET_PROJECT} " --non-interactive --json | tee output.json
165166CHANNEL_URL=$( cat output.json | jq -r " .result.customtarget.url" )
166167sleep 12
167168VALUE=" $( curl ${CHANNEL_URL} /${TARGET_FILE} ) "
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ CWD="$(pwd)"
44
55source scripts/set-default-credentials.sh
66
7- TARGET_FILE=" ${COMMIT_SHA} -${CI_JOB_ID} .txt"
7+ RUN_SUFFIX=" ${GITHUB_RUN_NUMBER:- $RANDOM } -${RUNNER_OS:- linux} -${RANDOM} "
8+ TARGET_FILE=" ${COMMIT_SHA} -${RUN_SUFFIX} .txt"
89
910echo " Running in ${CWD} "
1011echo " Running with node: $( which node) "
You can’t perform that action at this time.
0 commit comments