Skip to content

Commit 6411e40

Browse files
committed
[NDR-318] Find the running workflow
1 parent cc94f87 commit 6411e40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/build_and_deploy_sandbox.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,24 @@ if [[ "$FULL_DEPLOY" == "true" ]]; then
153153
echo "🔁 Triggering Full Deploy to Sandbox workflow '$NDR_WORKFLOW_FILE_FULL' from '$NDR_WORKFLOW_BRANCH' with branch '$NDR_BRANCH' to '$SANDBOX_NAME'..."
154154
# Trigger the workflow and capture the run ID
155155
gh workflow run "$NDR_WORKFLOW_FILE_FULL" --ref "$NDR_WORKFLOW_BRANCH" --field build_branch="$NDR_BRANCH" --field sandbox="$SANDBOX_NAME" --field environment="development" >/dev/null
156+
DISPLAY_TITLE="$NDR_BRANCH | $SANDBOX_NAME | development | false | true | true"
157+
WORKFLOW_FILE="$NDR_WORKFLOW_FILE_FULL"
156158
else
157159
echo "🔁 Triggering Deploy lambdas to Sandbox workflow '$NDR_WORKFLOW_FILE' from '$NDR_WORKFLOW_BRANCH' with branch '$NDR_BRANCH' to '$SANDBOX_NAME'..."
158160
# Trigger the workflow and capture the run ID
159161
gh workflow run "$NDR_WORKFLOW_FILE" --ref "$NDR_WORKFLOW_BRANCH" --field build_branch="$NDR_BRANCH" --field sandbox="$SANDBOX_NAME" --field environment="development" >/dev/null
162+
DISPLAY_TITLE="$NDR_BRANCH | $SANDBOX_NAME | development | true"
163+
WORKFLOW_FILE="$NDR_WORKFLOW_FILE"
160164
fi
161165

162166
for i in {1..10}; do
163167
lambda_run_id=$(
164168
gh run list \
165-
--workflow "$NDR_WORKFLOW_FILE" \
169+
--workflow "$WORKFLOW_FILE" \
166170
--event workflow_dispatch \
167171
--json status,databaseId,createdAt,displayTitle \
168172
--jq ".[]
169-
| select(.displayTitle == \"$NDR_BRANCH | $SANDBOX_NAME | development | true\")
173+
| select(.displayTitle == \"$DISPLAY_TITLE\")
170174
| select(.createdAt >= \"$START_TIME\")
171175
| select(.status == \"queued\" or .status == \"in_progress\")
172176
| .databaseId" |

0 commit comments

Comments
 (0)