In the project I'm working on, we use shell scripts to perform various tasks. Some SH / Bash scripts that run Rsync, and some are PHP scripts. One of the PHP scripts runs some integration tests that are output in JUnit XML, code coverage reports, etc.
Jenkins is able to mark assignments as successful / unsuccessful based on exit status . In PHP, the script exits with 1 if it finds that the tests failed during the run. Other shell scripts run commands and use exit codes to mark the assembly as unsuccessful.
// :: End of PHP : // If any tests have failed, fail the build if ($build_error) exit(1);
In Jenkins terminology, an unstable assembly is defined as
A line is unstable if it was built successfully, and one or more publishers report its instability. For example, if the JUnit publisher is configured and the test fails, the assembly will be marked as unstable.
How can I get Jenkins to mark the assembly as unstable, and not just success / failure when running shell scripts?
php shell build jenkins status
HNygard Nov 16 2018-11-11T00: 00-11
source share