File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
main/java/org/jenkinsci/plugins/workflow/multibranch
test/java/org/jenkinsci/plugins/workflow/multibranch Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 3434import hudson .model .DescriptorVisibilityFilter ;
3535import hudson .model .ItemGroup ;
3636import hudson .model .Queue ;
37+ import hudson .model .Result ;
3738import hudson .model .Run ;
3839import hudson .model .TaskListener ;
3940import hudson .scm .SCM ;
@@ -134,6 +135,7 @@ public SCMBinder(String scriptPath) {
134135 listener .error ("Could not compare lightweight checkout of trusted revision" ).println (Functions .printThrowable (x ).trim ());
135136 }
136137 if (tipScript != null && !script .equals (tipScript )) {
138+ build .setResult (Result .NOT_BUILT );
137139 throw new AbortException (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis (scriptPath ));
138140 }
139141 }
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ public static void assertRevisionAction(WorkflowRun build) {
265265 assertNotNull (b );
266266 assertEquals (1 , b .getNumber ());
267267 assertRevisionAction (b );
268- r .assertBuildStatus (Result .FAILURE , b );
268+ r .assertBuildStatus (Result .NOT_BUILT , b );
269269 r .assertLogContains (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis ("Jenkinsfile" ), b );
270270 r .assertLogContains ("not trusting" , b );
271271 SCMBinder .IGNORE_UNTRUSTED_EDITS = true ;
@@ -298,7 +298,7 @@ public static void assertRevisionAction(WorkflowRun build) {
298298 b = p .getLastBuild ();
299299 assertNotNull (b );
300300 assertEquals (4 , b .getNumber ());
301- r .assertBuildStatus (Result .FAILURE , b );
301+ r .assertBuildStatus (Result .NOT_BUILT , b );
302302 r .assertLogContains (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis ("Jenkinsfile" ), b );
303303 r .assertLogContains ("not trusting" , b );
304304 b = p .scheduleBuild2 (0 , new CauseAction (new Cause .UserIdCause ())).get ();
You can’t perform that action at this time.
0 commit comments