You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/scripts/auto-backport.py
+17-9
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ def parse_args():
29
29
parser.add_argument('--commits', default=None, type=str, help='Range of promoted commits.')
30
30
parser.add_argument('--pull-request', type=int, help='Pull request number to be backported')
31
31
parser.add_argument('--head-commit', type=str, required=is_pull_request(), help='The HEAD of target branch after the pull request specified by --pull-request is merged')
32
+
parser.add_argument('--label', type=str, required=is_pull_request(), help='Backport label name when --pull-request is defined')
if ! curl -X POST "$JENKINS_URL/job/$JOB_NAME/buildWithParameters" --fail --user "$JENKINS_USER:$JENKINS_API_TOKEN" -i -v; then
37
+
echo "Error: Jenkins job trigger failed"
38
+
39
+
# Send Slack message
40
+
curl -X POST -H 'Content-type: application/json' \
41
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
42
+
--data '{
43
+
"channel": "#releng-team",
44
+
"text": "🚨 @here '$JOB_NAME' failed to be triggered, please check https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} for more details",
0 commit comments