Releases: jenkinsci/saltstack-plugin
Work around StackOverflowError
Reset references on jsonObject in order to fix stackoverflow error
Large return
Increase http timeout from 5 second to 30 in order to support larger responses from salt-api
Don't assume kwarg inside of quotes
Test release of build which will not assume an equals sign inside of quotes is a keyword argument.
Intended to correct #102
Fix pipeline hook
Fixes broken hook endpoint in pipeline jobs from when support was added for pipeline fork and resume.
Import <= 1.7 configs
Adds compatibility bits for pre 2.0 releases.
Due to human error, there is a manual step necessary to fully import pre 2.0 build configs. If the Jenkins migrate old data page at administrativeMonitor/OldData/manage shows the error ConversionException: Cannot construct com.waytta.clientinterface.BasicClient
then delete the <clientInterface>
line from the config. This can be done with:
sed -i'.bak' '/<clientInterface>.*<\/clientInterface>/d' jenkinshome/jobs/jobname/config.xml
At this point reloading configs should restore the job data.
Long running pipeline support
Beta version incorporating support for long running pipelines. Jenkins kills the pipeline thread after 5 minutes, as long running tasks are expected to be handled differently. This release incorporates those methods.
- Long running tasks should now complete rather than be interrupted after 5 minutes.
- Local jobs with polling (Job with JID) should be resumed on jenkins master restart.
Proper Jenkins Step support
This release replaces the previous SimpleBuildStep Jenkins pipeline support with a proper Step implementation. This allows and requires salt-api output to be saved into a pipeline/groovy variable.
saltresult = salt authtype: 'pam', clientInterface: local(arguments: '"sleep 5; ls -la"', blockbuild: true, function: 'cmd.run', target: 'master', targetType: 'list'), credentialsId: 'a3d814c2-84ed-4752-94a8-271791bb5375', servername: 'http://localhost:8000'
println(saltresult)
hook support
- Major change: Arguments are now separated by spaces instead of commas in order to more closely match the command line syntax
- Removed separate text input for kwargs. Both args and kwargs are now specified in the single arguments field
- Added support for the /hook endpoint. This allows Jenkins to post an event with data on salt's event bus. These events can then be consumed by salt reactors
- Detect manage.present runner success
Early pipeline support
A super early draft of version 2 of the saltstack plugin.
This supports:
- running salt via a jenkins pipeline
- large cleanups
- salt subset support
- detect minion timeouts in order to fail build
- allow parameterized batch size
Example pipeline
def userInput
stage('prompt') {
userInput = input message: 'Change parameters?', parameters: [
string(defaultValue: 'master', description: 'What machines to target with command', name: 'target'),
string(defaultValue: 'runas=jenkins', description: 'Any kwargs', name: 'kwarguments')
]
echo ("target is: "+userInput['target'])
}
stage('execute salt') {
node {
echo ("kwarguments is: "+userInput['kwarguments'])
salt arguments: 'ls -la', authtype: 'pam', clientInterface: local(blockbuild: false, jobPollTime: 5, target: userInput['target'], targetType: 'glob'), credentialsId: 'a3d814c2-84ed-4752-94a8-271791bb5375', function: 'cmd.run', kwarguments: userInput['kwarguments'], servername: 'http://localhost:8000', target: 'master', targettype: 'glob'
}
}
Better logging
Use jenkins logging instead of printing debug info to console
To see what the plugin sends/receives to/from the saltapi, now just create a new jenkins logger.
Name: salt logs
Logger: com.waytta.saltstack
Log level: ALL (currently only logs to FINE, but this could always change)