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 34
34
import hudson .model .DescriptorVisibilityFilter ;
35
35
import hudson .model .ItemGroup ;
36
36
import hudson .model .Queue ;
37
+ import hudson .model .Result ;
37
38
import hudson .model .Run ;
38
39
import hudson .model .TaskListener ;
39
40
import hudson .scm .SCM ;
@@ -134,6 +135,7 @@ public SCMBinder(String scriptPath) {
134
135
listener .error ("Could not compare lightweight checkout of trusted revision" ).println (Functions .printThrowable (x ).trim ());
135
136
}
136
137
if (tipScript != null && !script .equals (tipScript )) {
138
+ build .setResult (Result .NOT_BUILT );
137
139
throw new AbortException (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis (scriptPath ));
138
140
}
139
141
}
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ public static void assertRevisionAction(WorkflowRun build) {
265
265
assertNotNull (b );
266
266
assertEquals (1 , b .getNumber ());
267
267
assertRevisionAction (b );
268
- r .assertBuildStatus (Result .FAILURE , b );
268
+ r .assertBuildStatus (Result .NOT_BUILT , b );
269
269
r .assertLogContains (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis ("Jenkinsfile" ), b );
270
270
r .assertLogContains ("not trusting" , b );
271
271
SCMBinder .IGNORE_UNTRUSTED_EDITS = true ;
@@ -298,7 +298,7 @@ public static void assertRevisionAction(WorkflowRun build) {
298
298
b = p .getLastBuild ();
299
299
assertNotNull (b );
300
300
assertEquals (4 , b .getNumber ());
301
- r .assertBuildStatus (Result .FAILURE , b );
301
+ r .assertBuildStatus (Result .NOT_BUILT , b );
302
302
r .assertLogContains (Messages .ReadTrustedStep__has_been_modified_in_an_untrusted_revis ("Jenkinsfile" ), b );
303
303
r .assertLogContains ("not trusting" , b );
304
304
b = p .scheduleBuild2 (0 , new CauseAction (new Cause .UserIdCause ())).get ();
You can’t perform that action at this time.
0 commit comments