Skip to content

Commit ac9d27d

Browse files
authored
Merge pull request #105 from StackStorm/fix/circleci-st2-pr-rules
Fix for CircleCI build after st2 PR merge
2 parents 7ebbc81 + 17c967a commit ac9d27d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

rules/st2_pkg_e2e_test_centos7_on_st2_pr.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,22 @@ criteria:
1111
trigger.body.payload.vcs_url:
1212
type: equals
1313
pattern: "https://github.com/StackStorm/st2"
14+
# branch not starting with 'master' or 'vX.Y'
15+
trigger.body.payload.branch:
16+
type: regex
17+
pattern: "^(?!master|v[0-9]+\\.[0-9]+).*$"
1418
trigger.body.payload.has_artifacts:
1519
type: equals
1620
pattern: true
21+
trigger.body.payload.build_parameters:
22+
type: exists
23+
pattern: CIRCLE_JOB
24+
# limit to 'packages' sub-task in CircleCI workflow
25+
trigger.body.payload.build_parameters.CIRCLE_JOB:
26+
type: equals
27+
pattern: packages
28+
# See bug: https://discuss.circleci.com/t/wrong-data-in-webhook-payload-for-workflows/15076
29+
# when 'pull_requests' payload is included even for commits outside of PRs
1730
trigger.body.payload.pull_requests[0]:
1831
type: contains
1932
pattern: url

rules/st2_pkg_e2e_test_ubuntu16_on_st2_pr.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,22 @@ criteria:
1111
trigger.body.payload.vcs_url:
1212
type: equals
1313
pattern: "https://github.com/StackStorm/st2"
14+
# branch not starting with 'master' or 'vX.Y'
15+
trigger.body.payload.branch:
16+
type: regex
17+
pattern: "^(?!master|v[0-9]+\\.[0-9]+).*$"
1418
trigger.body.payload.has_artifacts:
1519
type: equals
1620
pattern: true
21+
trigger.body.payload.build_parameters:
22+
type: exists
23+
pattern: CIRCLE_JOB
24+
# limit to 'packages' sub-task in CircleCI workflow
25+
trigger.body.payload.build_parameters.CIRCLE_JOB:
26+
type: equals
27+
pattern: packages
28+
# See bug: https://discuss.circleci.com/t/wrong-data-in-webhook-payload-for-workflows/15076
29+
# when 'pull_requests' payload is included even for commits outside of PRs
1730
trigger.body.payload.pull_requests[0]:
1831
type: contains
1932
pattern: url

0 commit comments

Comments
 (0)