Closed aytemuryakup closed 1 year ago
I thnk this regexp might work:
regexpFilterExpression: ".*"wheater-forecast-app/PrivateHub-Test/[^\"]+?\".*\\s(?!DevOps\$)"
After opening Issue, I tried combining 2 regex but triggering did not work properly. When I tried the regex you sent, it worked fine. Thanks for your support.
GenericTrigger(
genericVariables: [
[key: "changed_files", value: "\$.commits[*].['modified','added','removed'][*]"],
[key: "commit_user", value: "\$.user_name"]
],
causeString: 'Triggered on $changed_files',
tokenCredentialId: 'gitlab-trigger-token',
printContributedVariables: true,
printPostContent: true,
silentResponse: false,
regexpFilterText: '$changed_files $commit_user',
regexpFilterExpression: ".*\"wheater-forecast-app/PrivateHub-Test/[^\"]+?\".*\\s(?!DevOps\$)"
)
Hi everyone, I'm using the generic webhook trigger plugin when triggering jenkins via gitlab. I am using the path based generic webhook trigger feature. In addition, I want to use the user_name based trigger feature. I haven't seen more than one filtering like this, is this usage possible?
My Default trigger pipeline script like this:
Is it possible to use it like this? Or is the configuration correct?
What I want to do: If the committing user is DevOps, the pipeline is not triggered.
What I want to do in the trigger block above:
regexpFilterText
: I'm calling _changesfiles and commit_user regexes.regexpFilterExpression
:wheater-forecast-app/PrivateHub-Test/[^\"]+?
^(?!DevOps\$)
block.gitlab json request output: