diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index c9162965f..58d547956 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -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: @@ -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) diff --git a/tests/publishers/fixtures/text-finder001.xml b/tests/publishers/fixtures/text-finder001.xml index 2144183fb..cc7043372 100644 --- a/tests/publishers/fixtures/text-finder001.xml +++ b/tests/publishers/fixtures/text-finder001.xml @@ -7,6 +7,7 @@ true false false + false diff --git a/tests/publishers/fixtures/text-finder001.yaml b/tests/publishers/fixtures/text-finder001.yaml index 3bf42311b..7dd930578 100644 --- a/tests/publishers/fixtures/text-finder001.yaml +++ b/tests/publishers/fixtures/text-finder001.yaml @@ -5,3 +5,4 @@ publishers: also-check-console-output: true succeed-if-found: false unstable-if-found: false + not-built-if-found: false