Skip to content

Commit

Permalink
formating exit condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaiShalevRH committed Dec 18, 2024
1 parent f8a2876 commit 21dc24f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/templates-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ jobs:
echo "Launch Advanced Template"
ADVANCED_TASK_ID=$(curl -X POST "$BACKSTAGE_URL/api/scaffolder/v2/tasks" -H "Authorization: Bearer $BACKEND_TOKEN" -H "Content-Type: application/json" -d '{"templateRef":"template:default/advanced-workflow-bootstrap","values":{"owner":"user:guest","orgName":"'$GITHUB_ORG'","repoName":"advanced","description":"This is a Test Repository","workflowId":"test","CI":"tekton_argocd","argocdNamespace":"argocd","infrastructureWorkflowId":"test","namespace":"sonataflow-operator-system","persistencePSQLDatabaseName":"sonataflow","persistencePSQLPasswordKey":"$PSQL_SECRET","persistencePSQLSecretName":"sonataflow-psql-postgresql","persistencePSQLServiceName":"orchestrator-postgresql","persistencePSQLServiceNamespace":"default","persistencePSQLServicePort":5432,"persistencePSQLUserKey":"'$PSQL_SECRET'","quayConfig":"Use Existing Repository","quayOrgName":"testing-eshalev","quayRepoName":"test","system":"Guest"}}' | jq .id | tr -d '"')
echo "ADVANCED_TASK_ID is $ADVANCED_TASK_ID"
if [ -z "$ADVANCED_TASK_ID" ]; then exit 1;
if [ -z "$ADVANCED_TASK_ID" ];
then
exit 1;
fi
echo "ADVANCED_TASK_ID=$ADVANCED_TASK_ID" >> $GITHUB_ENV
- name: Validate Advanced Template Successs
Expand All @@ -102,7 +105,10 @@ jobs:
echo "Launch Basic Template"
BASIC_TASK_ID=$(curl -X POST "$BACKSTAGE_URL/api/scaffolder/v2/tasks" -H "Authorization: Bearer $BACKEND_TOKEN" -H "Content-Type: application/json" -d '{"templateRef":"template:default/basic-workflow-bootstrap","values":{"owner":"user:guest","orgName":"'$GITHUB_ORG'","repoName":"basic","description":"This is a Test Repository","workflowId":"test","CI":"tekton_argocd","argocdNamespace":"argocd","infrastructureWorkflowId":"test","namespace":"sonataflow-operator-system","persistencePSQLDatabaseName":"sonataflow","persistencePSQLPasswordKey":"$PSQL_SECRET","persistencePSQLSecretName":"sonataflow-psql-postgresql","persistencePSQLServiceName":"orchestrator-postgresql","persistencePSQLServiceNamespace":"default","persistencePSQLServicePort":5432,"persistencePSQLUserKey":"$PSQL_SECRET","workflowType":"infrastructure", "quayConfig":"Use Existing Repository","quayOrgName":"testing-eshalev","quayRepoName":"test","system":"Guest"}}' | jq .id | tr -d '"')
echo "BASIC_TASK_ID is $BASIC_TASK_ID"
if [ -z "$BASIC_TASK_ID" ]; then exit 1;
if [ -z "$BASIC_TASK_ID" ];
then
exit 1;
fi
echo "BASIC_TASK_ID=$BASIC_TASK_ID" >> $GITHUB_ENV
- name: Validate Basic Template Successs
Expand Down

0 comments on commit 21dc24f

Please sign in to comment.