Skip to content

Commit 0d953bb

Browse files
authored
Fail the automerge task when a problem occurs e.g. bad credentials (#111)
1 parent 0b20067 commit 0d953bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

automerge-example/webhooks/templates/automerge-task.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ spec:
3434
- name: merge-pr
3535
image: YOUR_DOCKER_HUB_ID/hub-test
3636
script: |
37-
#!/bin/bash -x
38-
37+
#!/bin/bash -ex
38+
# Intentionally use the -e here so we fail the PipelineRun if anything goes wrong
39+
# for example in the case of bad credentials being provided.
3940
if [ $(params.event-type) = "push" ]; then
4041
echo "git push on branch $(params.branch-name)"
4142
if [ $(params.branch-name) = "refs/heads/master" ]; then

0 commit comments

Comments
 (0)