Skip to content

Commit 4049353

Browse files
committed
CCM-11870 Pipeline fix
1 parent a4c3fca commit 4049353

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/dispatch_internal_repo_workflow.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
)
8686
}')
8787
88-
# Trigger The workflow
88+
# Trigger the workflow
8989
curl -L \
9090
--fail \
9191
--silent \
@@ -114,7 +114,7 @@ jobs:
114114
--arg targetAccountGroup "${{ inputs.targetAccountGroup }}" \
115115
--arg targetComponent "${{ inputs.targetComponent }}" \
116116
--arg terraformAction "${{ inputs.terraformAction }}" \
117-
'.workflow_runs[]
117+
'[.workflow_runs[]
118118
| select(.path == ".github/workflows/" + $targetWorkflow)
119119
| select(.name
120120
| contains($targetEnvironment)
@@ -126,7 +126,7 @@ jobs:
126126
then select(.name | contains("caller:" + $callerRunId))
127127
else .
128128
end
129-
| .url')
129+
] | sort_by(.id) | last | .url')
130130
131131
if [[ -n "$workflow_run_url" && "$workflow_run_url" != null ]]; then
132132
ui_url=${workflow_run_url/api./}
@@ -157,6 +157,12 @@ jobs:
157157
conclusion=$(echo "$response" | jq -r '.conclusion')
158158
159159
if [ "$status" == "completed" ]; then
160+
if [ -z "$conclusion" ] || [ "$conclusion" == "null" ]; then
161+
echo "Workflow marked completed but conclusion not yet available, retrying..."
162+
sleep 5
163+
continue
164+
fi
165+
160166
if [ "$conclusion" == "success" ]; then
161167
echo "Workflow completed successfully."
162168
exit 0

0 commit comments

Comments
 (0)