Skip to content

Commit a847467

Browse files
test push
1 parent f518e6c commit a847467

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Trigger Jenkins Job
33
on:
44
push:
55
branches:
6-
- latest
7-
paths:
8-
- superstream-clients/pom.xml
6+
- remove-jenkinsfile
7+
# paths:
8+
# - superstream-clients/pom.xml
99

1010
jobs:
1111
trigger-jenkins:
@@ -19,6 +19,14 @@ jobs:
1919
env:
2020
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
2121
run: |
22-
curl -X POST https://jenkins.superstream.ai/job/DevOps/job/Superstream/job/SDK/job/superstream-clients-java/buildWithParameters?DEPLOYMENT_TYPE=production \
23-
--user "[email protected]:$JENKINS_TOKEN" \
24-
--header "Content-Type: application/json"
22+
HTTP_STATUS=$(curl -w "%{http_code}" -o /tmp/jenkins_response.txt -f -X POST \
23+
"https://jenkins.superstream.ai/job/DevOps/job/Superstream/job/SDK/job/superstream-clients-java/buildWithParameters?DEPLOYMENT_TYPE=production" \
24+
--user "[email protected]:$JENKINS_TOKEN")
25+
26+
if [ $? -ne 0 ] || [ "$HTTP_STATUS" -ne 201 ] && [ "$HTTP_STATUS" -ne 200 ]; then
27+
echo "Jenkins trigger failed with HTTP status: $HTTP_STATUS"
28+
cat /tmp/jenkins_response.txt
29+
exit 1
30+
fi
31+
32+
echo "Successfully triggered Jenkins build (HTTP $HTTP_STATUS)"

0 commit comments

Comments
 (0)