Rundeck API v5 and job logging support #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Vincent,
I have been working with a client of ours and Rundeck 1.4.4 release candidate:
This version implements Rundeck API v5 and contains additional support for job logging.
The pull request contains the following changes:
My forked:
In my bamboo rundeck plugin, I have been able to get the data using the following:
private void logExecutionOutput(int outputLevel) throws TaskException { // get the first set of output lines no more than LOG_MAXLINES starting at beginning int offset = 0; buildLogger.addBuildLogEntry("BEGIN RUNDECK EXECUTION OUTPUT"); while (true) { RundeckOutput rundeckOutput = getRundeckClient().getJobExecutionOutput(getExecutionId(), offset, 0, LOG_MAXLINES); if (null == rundeckOutput) { buildLogger.addBuildLogEntry("WARNING, no output from job detected, rundeckOutput is null"); break; } List listEntries = rundeckOutput.getLogEntries(); if (null == listEntries) { break; } if (listEntries.size() != 0) { RundeckOutputEntry[] rundeckOutputEntries = listEntries.toArray(new RundeckOutputEntry[listEntries.size()]); for (int i=0; i LOG_OUT) { buildLogger.addErrorLogEntry(message); } else { buildLogger.addBuildLogEntry(message); } if (null != message) { offset+=message.length(); } } } if (rundeckOutput.getPercentLoaded() == 1.0) { break; } } buildLogger.addBuildLogEntry("END RUNDECK EXECUTION OUTPUT"); }I need to obtain some test classes for these changes. Anthony Shortland and I are working with a client who cannot publish their changes to OSS projects and are working on their behalf. So in addition to your review, we can get them shortly.
Additionally, it appears that it may be required to release separate versions of your api so that it uses the desired api version of Rundeck? We can also discuss this with Greg Schueler.
Thanks,
Chuck