Piotr Falkowski cd8c8bfbb7 Added configuration for Suppress SCM Triggering
In version 2.1045.v4ec3ed07b_e4f Branch API Plugin added options to
configure suppressing SCM trigger. Previously this feature could
be only turned on or off, now it's possible to select what to suppress
and on which branches.
(see https://github.com/jenkinsci/branch-api-plugin/pull/244)

This commit adds support for this option by allowing dictionary syntax
for `suppress-scm-triggering` element:
  ```
  - suppress-scm-triggering:
      suppression-strategy: suppress-branch-indexing
      branch-regex: ^.*test.*$
  ```
while preserving support for currently existing syntax:
  ```
  - suppress-scm-triggering: true
  ```

Change-Id: I5d0b32042fc07d674bf2f26e5b468f051077fb02
2023-03-30 13:17:39 +02:00

121 lines
4.0 KiB
YAML

name: scm-github-full
project-type: multibranch
script-path: some.Jenkinsfile
scm:
- github:
api-uri: http://example.org/github
ssh-checkout:
credentials: 'ssh_secret'
repo: example-repo
repo-owner: example-owner
credentials-id: example-credential
branch-discovery: all
head-filter-regex: "(.*/master|.*/release/.*)"
head-pr-filter-behaviors:
head-pr-destined-regex:
branch-regexp: "foo/.*"
tag-regexp: "20\\..*"
head-pr-destined-wildcard:
branch-includes: "foo*"
tag-includes: "qaz*"
branch-excludes: "bar*"
tag-excludes: "*baz"
head-pr-originated-regex:
branch-regexp: "(foo/.*|bar/.*)"
tag-regexp: "1\\..*"
head-pr-originated-wildcard:
branch-includes: "qaz*"
tag-includes: "bar*"
branch-excludes: "baz*"
tag-excludes: "*qaz"
discover-pr-forks-strategy: both
discover-pr-forks-trust: everyone
discover-pr-origin: both
discover-tags: true
notification-context:
label: 'jenkins.example.com/my_context'
suffix: false
status-checks:
name: my-checks
skip: true
skip-branch-source-notifications: true
publish-unstable-as-neutral: true
suppress-log-output: true
suppress-progress-updates: true
verbose-logs: true
property-strategies:
all-branches:
- suppress-scm-triggering:
suppression-strategy: suppress-branch-indexing
branch-regex: ^.*test.*$
- pipeline-branch-durability-override: max-survivability
- trigger-build-on-pr-comment:
comment: "Ci build!"
allow-untrusted-users: true
- trigger-build-on-pr-review:
allow-untrusted-users: true
- trigger-build-on-pr-update:
allow-untrusted-users: true
build-strategies:
- all-strategies-match:
strategies:
- regular-branches: true
- skip-initial-build: true
- any-strategies-match:
strategies:
- change-request: {}
- tags: {}
- tags:
ignore-tags-newer-than: 1
ignore-tags-older-than: 7
- tags: {}
- change-request:
ignore-target-only-changes: true
- change-request: {}
- regular-branches: true
- skip-initial-build: true
- named-branches:
- exact-name:
name: 'test'
case-sensitive: true
- regex-name:
regex: 'test.*$'
case-sensitive: true
- wildcards-name:
excludes: 'testexclude'
includes: 'testinclude'
- named-branches:
- exact-name: {}
- regex-name: {}
- wildcards-name: {}
clean:
after: true
before: true
committer:
user: CI System
email: no-reply@ci.example.com
prune: true
local-branch: true
sparse-checkout:
paths:
- "path1"
- "path2"
- "path3"
shallow-clone: true
depth: 3
do-not-fetch-tags: true
disable-pr-notifications: true
refspecs:
- '+refs/heads/*:refs/remotes/@{remote}/*'
submodule:
disable: false
recursive: true
parent-credentials: true
timeout: 100
threads: 1
timeout: "100"
skip-notifications: true
use-author: true
wipe-workspace: true
lfs-pull: true