-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to submit a new external job per CLI #5
Conversation
With this command external job submission is possible per CLI. Per pipe gzipped log file can be transported. No wrapper scripts are needed it can be easily done from the command line: cat log.gz | ssh jenkins set-external-build-result --job b --result 0 --log -
Jenkins » external-monitor-job-plugin #16 SUCCESS |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Originally #2. |
Make it possible to submit a new external job per CLI
…itten. A CLI option can be TopLevelItem, not a subclass (apparently). Also some other fixups: Need not be serializable. Printing to System.out is useless; you need to use CLICommand.stdout. A meta var for --dump-build-number is meaningless since it takes no arguments. Making --result be successful by default. Fixing documentation of --display.
Thanks, for fixing it! I need to adjust LibreOffice code. May be we can put that part from out buildbot-plugin code as JUnit or contrib example? |
I would extract that code and submit a pull request: |
Sorry, thought my comment was inserted twice so I deleted the second, but that was the only one. Yes you can try taking code similar to that, and making it into a |
So we probably don't want to introduce the GIT dependency (URLish) to jenkins. I wonder how could i conduct a JUnit test for new introduce CLI command? I found these info: https://wiki.jenkins-ci.org/display/JENKINS/Unit+Test but it is not obvious to me how to call CLI command from a standard JenkinsRule unit test. Any thoughts? Thanks. |
Okay, found how to invoke CLI so far, With latest published parent pom 1.529 it seems to be really easy to do. I am getting NPE exception while trying to create ExternalJob instance. here is the code: Any clue? |
Seems to be general problem with that version: Old style unit test doesn't work either: public class ExternalRunTest extends HudsonTestCase { has the same NPE. With the parent pom version that you suggested 1.480.3 the old unit test seems to ork. However the new classes CLICommandInvoker are missing in this version. That why i was trying to make it work with new new one. |
Ok, bibisect helps: tried all version and it was broken in the version 1.512. |
Just uploaded a new pull request: CLI command is failing: argument parsing still broken. any ideas? Thanks |
With this command external job submission is possible per CLI.
Per pipe gzipped log file can be transported. No wrapper scripts are needed
it can be easily done from the command line:
cat log.gz | ssh jenkins set-external-build-result --job b --result 0 --log -