Skip to content

Commit 7da6fc3

Browse files
SCANCLI-202 Check Zena Connection step should fail when token is not valid anymore (#250)
1 parent e834805 commit 7da6fc3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/zosEndToEndTest.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ jobs:
4242
4343
- name: Check Zena Connection
4444
run: |
45-
curl -sSL -H "Authorization: Bearer $SONAR_TOKEN" "https://zena.sonarsource.com/api/v2/analysis/version"
45+
status=$(curl -sSL -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $SONAR_TOKEN" "https://zena.sonarsource.com/api/v2/analysis/version")
46+
if [ "$status" -ne 200 ]; then
47+
echo "Zena connection failed with status $status"
48+
exit 1
49+
fi
4650
4751
- name: Add SSH informations
4852
run: |

0 commit comments

Comments
 (0)