Closed jupierce closed 8 years ago
Note that test failure is expected until openshift/openshift-restclient-java#220 merges/installs.
On Tue, Oct 4, 2016 at 11:44 AM, Justin Pierce notifications@github.com wrote:
Adding exec function for card: https://trello.com/c/Yl4qomsw/878-5-additional-jenkins- plugin-enhancement-requests-from-github
Depends on openshift/openshift-restclient-java#220 https://github.com/openshift/openshift-restclient-java/pull/220
ptal @gabemontero https://github.com/gabemontero , @bparees https://github.com/bparees
Example verbose DSL:
openshiftExec( apiURL: 'https://10.13.137.145:8443', authToken: 'LsGHr_1XPhCkBVc7p6TivqVpvtDs0BDm9dIL8RdK0vU', command: 'echo', arguments: [ [ value: 'hello'], [value: 'world'] ], namespace: 'myproject', pod: 'ruby-hello-world-1-6939a', verbose: 'true', waitTime: '120000' )
Example compact DSL (command and arguments in one groovy list):
openshiftExec( apiURL: 'https://10.13.137.145:8443', ... command: [ 'echo', 'hello', 'world' ], )
[image: screenshot from 2016-10-04 11-43-07]
https://cloud.githubusercontent.com/assets/19783215/19081321/df53129e-8a27-11e6-8dcb-08d70435799d.png
You can view, comment on, or merge this pull request online at:
https://github.com/openshift/jenkins-plugin/pull/70 Commit Summary
- Adding exec function to Jenkins OpenShift Plugin
File Changes
- M README.md https://github.com/openshift/jenkins-plugin/pull/70/files#diff-0 (13)
- M pom.xml https://github.com/openshift/jenkins-plugin/pull/70/files#diff-1 (2)
- A src/main/java/com/openshift/jenkins/plugins/pipeline/ Argument.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-2 (28)
- M src/main/java/com/openshift/jenkins/plugins/pipeline/ MessageConstants.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-3 (8)
- A src/main/java/com/openshift/jenkins/plugins/pipeline/ OpenShiftExec.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-4 (130)
- A src/main/java/com/openshift/jenkins/plugins/pipeline/dsl/ OpenShiftExec.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-5 (196)
- A src/main/java/com/openshift/jenkins/plugins/pipeline/dsl/ OpenShiftExecExecution.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-6 (47)
- A src/main/java/com/openshift/jenkins/plugins/pipeline/ model/IOpenShiftExec.java https://github.com/openshift/jenkins-plugin/pull/70/files#diff-7 (118)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/Argument/config.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-8 (11)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/Argument/global.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-9 (15)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/Argument/help-value.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-10 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/config.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-11 (40)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/global.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-12 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-apiURL.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-13 (7)
Yeah, the git file changed inventory doesn't convey (at least to my interpretation) whether the help and config files in this directory are linked with their analogous versions in the dsl subdirectory. So a query / reminder up top before officially reviewing on whether you linked the files. Thanks.
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-arguments.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-14 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-authToken.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-15 (6)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-command.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-16 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-container.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-17 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-namespace.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-18 (4)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-pod.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-19 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-verbose.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-20 (3)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/OpenShiftExec/help-waitTime.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-21 (4)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/config.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-22 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/global.jelly https://github.com/openshift/jenkins-plugin/pull/70/files#diff-23 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-apiURL.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-24 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-arguments.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-25 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-authToken.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-26 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-command.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-27 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-container.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-28 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-namespace.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-29 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-pod.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-30 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-verbose.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-31 (1)
- A src/main/resources/com/openshift/jenkins/plugins/ pipeline/dsl/OpenShiftExec/help-waitTime.html https://github.com/openshift/jenkins-plugin/pull/70/files#diff-32 (1)
Patch Links:
- https://github.com/openshift/jenkins-plugin/pull/70.patch
- https://github.com/openshift/jenkins-plugin/pull/70.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/jenkins-plugin/pull/70, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbadPpxg3QxHqniTt6WkbWINKUnn0sUks5qwnRvgaJpZM4KN1pP .
Yep. src/main/resources/com/openshift/jenkins/plugins/pipeline/dsl/OpenShiftExec contains only symlinks.
Seems plausible - let's go with what you've got.
On Wed, Oct 5, 2016 at 10:28 AM, Justin Pierce notifications@github.com wrote:
@jupierce commented on this pull request.
In src/main/java/com/openshift/jenkins/plugins/pipeline/dsl/ OpenShiftExec.java https://github.com/openshift/jenkins-plugin/pull/70:
- if ( o == null ) {
- return def;
- }
- return o.toString();
- } +
- private String argumentAsString(Map<String, Object> arguments, String arg ) throws IllegalArgumentException {
- return requiredArgument(arguments, arg ).toString();
- } +
- @Override
- public Step newInstance(Map<String, Object> arguments) throws Exception {
- OpenShiftExec step = new OpenShiftExec( argumentAsString( arguments, "pod" ) );
- step.setContainer( argumentAsString( arguments, "container", "" ) ); +
- Object commandObject = requiredArgument( arguments, "command" );
My best assessment is that stapler does not support this scenario. You can have multiple DataBoundConstructors, but it is to add/deprecate parameters. It does not support the flexible unmarshalling this shorthand demands.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/jenkins-plugin/pull/70, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbadPBvtTlwGWGllu6SZnpWNhcL3okeks5qw7QRgaJpZM4KN1pP .
@gabemontero PR test flake has been addressed.
Rebased.
Failure is a dependency on #75
[test]
[test]
IGTM ... will hit the button after the test job completes.
Adding exec function for card: https://trello.com/c/Yl4qomsw/878-5-additional-jenkins-plugin-enhancement-requests-from-github
Depends on openshift/openshift-restclient-java#220
ptal @gabemontero , @bparees
Example verbose DSL:
Example compact DSL (command and arguments in one groovy list):