Skip to content

Commit 65fa24a

Browse files
authored
export stack name early (#190)
* export stack name early * use updated start aws enclave script * enahnce stack name echo * enahnce stack name echo * debug cf name exposed * debug * show up to 100 lines of code for debugging * show up to 100 lines of code for debugging * show up to 100 lines of code for debugging * fix path route * uses relative path since in the same repo * remove debug lines * clean up * invert if block for clearer intention * make start gcp operator fail * update gcp reference * update references * revert gcp testing * revert gcp testing * update reference * update reference * revert reference tag, ready for merge * Update comment
1 parent 0766839 commit 65fa24a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

scripts/aws/start_aws_enclave.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ source "${ROOT}/healthcheck.sh"
4848
DATE=$(date '+%Y%m%d%H%M%S')
4949
AWS_STACK_NAME="uid2-operator-e2e-${AWS_AMI}-${DATE}"
5050

51+
# Export stack name to GitHub output early for cleanup
52+
echo "AWS_STACK_NAME=${AWS_STACK_NAME}"
53+
54+
if [ -n "${GITHUB_OUTPUT:-}" ]; then
55+
echo "AWS_STACK_NAME=${AWS_STACK_NAME}" >> "${GITHUB_OUTPUT}"
56+
else
57+
echo "Not running inside GitHub Actions"
58+
fi
59+
5160
CF_TEMPLATE_SCOPE=""
5261
case "${IDENTITY_SCOPE}" in
5362
UID2) CF_TEMPLATE_SCOPE="UID" ;;
@@ -74,15 +83,6 @@ aws cloudformation describe-stacks \
7483
--stack-name "${AWS_STACK_NAME}" \
7584
--region "${AWS_REGION}"
7685

77-
# Export to GitHub output
78-
echo "AWS_STACK_NAME=${AWS_STACK_NAME}"
79-
80-
if [ -z "${GITHUB_OUTPUT}" ]; then
81-
echo "Not in GitHub action"
82-
else
83-
echo "AWS_STACK_NAME=${AWS_STACK_NAME}" >> ${GITHUB_OUTPUT}
84-
fi
85-
8686
# Get public URL
8787
AWS_INSTANCE_URL=$(python ${ROOT}/aws/get_instance_url.py \
8888
--region "${AWS_REGION}" \

0 commit comments

Comments
 (0)