Merge "Add support for forbidden file paths in gerrit trigger"
This commit is contained in:
77
tests/triggers/fixtures/gerrit008.xml
Normal file
77
tests/triggers/fixtures/gerrit008.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<triggers class="vector">
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
||||
<spec/>
|
||||
<gerritProjects>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern>test-project</pattern>
|
||||
<branches>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern>master</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern>stable</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
</branches>
|
||||
<filePaths>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern>**</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
|
||||
</filePaths>
|
||||
<forbiddenFilePaths>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
|
||||
<compareType>ANT</compareType>
|
||||
<pattern>subdirectory/**</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath>
|
||||
</forbiddenFilePaths>
|
||||
<topics>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Topic>
|
||||
<compareType>ANT</compareType>
|
||||
<pattern>refactor-xy**</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Topic>
|
||||
</topics>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
</gerritProjects>
|
||||
<skipVote>
|
||||
<onSuccessful>true</onSuccessful>
|
||||
<onFailed>true</onFailed>
|
||||
<onUnstable>true</onUnstable>
|
||||
<onNotBuilt>true</onNotBuilt>
|
||||
</skipVote>
|
||||
<silentMode>false</silentMode>
|
||||
<silentStartMode>true</silentStartMode>
|
||||
<escapeQuotes>false</escapeQuotes>
|
||||
<noNameAndEmailParameters>false</noNameAndEmailParameters>
|
||||
<readableMessage>false</readableMessage>
|
||||
<dependencyJobsNames>job1, job2</dependencyJobsNames>
|
||||
<notificationLevel>ALL</notificationLevel>
|
||||
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
|
||||
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
|
||||
<allowTriggeringUnreviewedPatches>true</allowTriggeringUnreviewedPatches>
|
||||
<triggerOnEvents>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
|
||||
<excludeDrafts>true</excludeDrafts>
|
||||
<excludeTrivialRebase>true</excludeTrivialRebase>
|
||||
<excludeNoCodeChange>true</excludeNoCodeChange>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
|
||||
<verdictCategory>APRV</verdictCategory>
|
||||
<commentAddedTriggerApprovalValue>1</commentAddedTriggerApprovalValue>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
|
||||
</triggerOnEvents>
|
||||
<buildStartMessage/>
|
||||
<buildFailureMessage/>
|
||||
<buildSuccessfulMessage/>
|
||||
<buildUnstableMessage/>
|
||||
<buildNotBuiltMessage/>
|
||||
<buildUnsuccessfulFilepath>path/to/filename</buildUnsuccessfulFilepath>
|
||||
<customUrl/>
|
||||
<serverName>my-server</serverName>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
||||
</triggers>
|
||||
</project>
|
||||
42
tests/triggers/fixtures/gerrit008.yaml
Normal file
42
tests/triggers/fixtures/gerrit008.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
triggers:
|
||||
- gerrit:
|
||||
trigger-on:
|
||||
- patchset-created-event:
|
||||
exclude-drafts: true
|
||||
exclude-trivial-rebase: true
|
||||
exclude-no-code-change: true
|
||||
- comment-added-event:
|
||||
approval-category: 'APRV'
|
||||
approval-value: 1
|
||||
projects:
|
||||
- project-compare-type: 'PLAIN'
|
||||
project-pattern: 'test-project'
|
||||
branches:
|
||||
- branch-compare-type: 'PLAIN'
|
||||
branch-pattern: 'master'
|
||||
- branch-compare-type: 'PLAIN'
|
||||
branch-pattern: 'stable'
|
||||
file-paths:
|
||||
- pattern: '**'
|
||||
forbidden-file-paths:
|
||||
- compare-type: ANT
|
||||
pattern: subdirectory/**
|
||||
topics:
|
||||
- compare-type: ANT
|
||||
pattern: refactor-xy**
|
||||
skip-vote:
|
||||
successful: true
|
||||
failed: true
|
||||
unstable: true
|
||||
notbuilt: true
|
||||
silent: false
|
||||
silent-start: true
|
||||
escape-quotes: false
|
||||
no-name-and-email: false
|
||||
dependency-jobs: 'job1, job2'
|
||||
notification-level: ALL
|
||||
dynamic-trigger-enabled: true
|
||||
dynamic-trigger-url: http://myhost/mytrigger
|
||||
trigger-for-unreviewed-patches: true
|
||||
server-name: my-server
|
||||
failure-message-file: path/to/filename
|
||||
Reference in New Issue
Block a user