Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache committed Sep 13, 2024
1 parent c4cef16 commit 639a4a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e2e/move2kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ echo "M2K is available in backstage, sending execution request"
out=$(curl -XPOST -H "Content-Type: application/json" -H "Authorization: Bearer ${BACKEND_SECRET}" \
${BACKSTAGE_URL}/api/orchestrator/v2/workflows/m2k/execute \
-d "{\"inputData\": {\"repositoryURL\": \"ssh://${GIT_REPO}\", \"recipients\": [\"user:default/guest\"], \"sourceBranch\": \"${GIT_SOURCE_BRANCH}\", \"targetBranch\": \"${GIT_TARGET_BRANCH}\", \"workspaceId\": \"${WORKSPACE_ID}\", \"projectId\": \"${PROJECT_ID}\"}}")
ID=$(echo "$out" | jq -e .id)
ID=$(echo "$out" | jq -r -e .id)

echo "Workflow ID: ${ID}"

if [ -z "$ID" ] || [ "$ID" == "null" ]; then
echo "workflow instance id is null... exiting "
Expand Down Expand Up @@ -212,6 +214,8 @@ out=$(curl -XPOST -H "Content-Type: application/json" -H "Authorization: Bearer
-d "{\"inputData\": {\"repositoryURL\": \"ssh://${GIT_REPO}_WRONG\", \"recipients\": [\"user:default/guest\"], \"sourceBranch\": \"${GIT_SOURCE_BRANCH}\", \"targetBranch\": \"${GIT_TARGET_BRANCH}\", \"workspaceId\": \"${WORKSPACE_ID}\", \"projectId\": \"${PROJECT_ID}\"}}")
ID=$(echo "$out" | jq -r -e .id)

echo "Workflow ID: ${ID}"

if [ -z "$ID" ] || [ "$ID" == "null" ]; then
echo "workflow instance id is null... exiting "
exit 1
Expand Down

0 comments on commit 639a4a4

Please sign in to comment.