Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-42640] Fix validation of wrappers and some types
In validating the options contents, we didn't actually look for a StepDescriptor, just a symbol-driven Descriptor. Which won't work for steps! So we never actually validated the contents of wrappers in options. Besides that, we needed to reject converting to int from String/Boolean - that gets through ScriptByteCodeAdapter.castToType, but not runtime.
- Loading branch information
Showing
9 changed files
with
88 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
pipeline-model-definition/src/test/resources/json/errors/jsonParameterTypeCoercion.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{"pipeline": { | ||
"stages": [ { | ||
"name": "foo", | ||
"branches": [ { | ||
"name": "default", | ||
"steps": [ { | ||
"name": "echo", | ||
"arguments": [ { | ||
"key": "message", | ||
"value": { | ||
"isLiteral": true, | ||
"value": "hello" | ||
} | ||
}] | ||
}] | ||
}] | ||
}], | ||
"agent": {"type": "none"}, | ||
"options": {"options": [ { | ||
"name": "timeout", | ||
"arguments": [ | ||
{ | ||
"key": "time", | ||
"value": { | ||
"isLiteral": true, | ||
"value": "5" | ||
} | ||
}, | ||
{ | ||
"key": "unit", | ||
"value": { | ||
"isLiteral": true, | ||
"value": "MINUTES" | ||
} | ||
} | ||
] | ||
}]} | ||
}} |