Merge pull request #37833 from vodik/jenkins-run

Add jenkins.run
This commit is contained in:
Mike Place 2016-11-28 14:11:05 -07:00 committed by GitHub
commit eb7b1e8a9c

View File

@ -76,6 +76,26 @@ def _connect():
password=jenkins_password)
def run(script):
'''
.. versionadded:: Carbon
Execute a groovy script on the jenkins master
:param script: The groovy script
CLI Example:
.. code-block::
salt '*' jenkins.run 'Jenkins.instance.doSafeRestart()'
'''
server = _connect()
return server.run_script(script)
def get_version():
'''
Return version of Jenkins