Skip to content

Commit

Permalink
text-finder: support not-built-if-found
Browse files Browse the repository at this point in the history
Added upstream June 2018 in jenkinsci/text-finder-plugin#16

Released upstream with 1.11 in June 2019: https://wiki.jenkins.io/display/JENKINS/Text-finder+Plugin

Change-Id: I28cf1425da98091ae0b19f450aea3fa5de6546c6
  • Loading branch information
df7cb committed Oct 10, 2019
1 parent 84c114c commit 6e83528
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jenkins_jobs/modules/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,8 @@ def text_finder(registry, xml_parent, data):
Force a build to succeed if a string was found (default false)
:arg bool unstable-if-found:
Set build unstable instead of failing the build (default false)
:arg bool not-built-if-found:
Set build to "Not Built" instead of failing the build (default false)
Example:
Expand All @@ -3990,6 +3991,7 @@ def text_finder(registry, xml_parent, data):
("also-check-console-output", "alsoCheckConsoleOutput", False),
("succeed-if-found", "succeedIfFound", False),
("unstable-if-found", "unstableIfFound", False),
("not-built-if-found", "notBuiltIfFound", False),
]
helpers.convert_mapping_to_xml(finder, data, mappings, fail_required=True)

Expand Down
1 change: 1 addition & 0 deletions tests/publishers/fixtures/text-finder001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<alsoCheckConsoleOutput>true</alsoCheckConsoleOutput>
<succeedIfFound>false</succeedIfFound>
<unstableIfFound>false</unstableIfFound>
<notBuiltIfFound>false</notBuiltIfFound>
</hudson.plugins.textfinder.TextFinderPublisher>
</publishers>
</project>
1 change: 1 addition & 0 deletions tests/publishers/fixtures/text-finder001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ publishers:
also-check-console-output: true
succeed-if-found: false
unstable-if-found: false
not-built-if-found: false

0 comments on commit 6e83528

Please sign in to comment.