The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Rundeck plugin

step([$class: 'RundeckNotifier']): Rundeck

  • rundeckInstance
    • Type: String
  • jobId
    • Type: String
  • options

    This is the list of options for the Rundeck job you want to execute. It should be in the Java-Properties format, 1 option per line : key=value.

    You can use Jenkins environment variables ($BUILD_NUMBER, $BUILD_ID, $JOB_NAME, $WORKSPACE, etc) or System environment variables ($HOME, $PATH, etc) in your options, and we will expand them when notifying Rundeck.

    We will also expand the special token "$ARTIFACT_NAME{regex}" (where "regex" is a java-regex) to the name of the first matching artifact found.
    For example, $ARTIFACT_NAME{.*\.war} will matches your WAR artifact, while $ARTIFACT_NAME{.*-sources\.jar} will matches your sources artifact.

    • Type: String
  • nodeFilters

    This is a list of filters to optionally filter the nodes on which your Rundeck will run.
    You can specify which node to include using a single value, a list of values, or a regular expression (for example the .* pattern will match any text) as the argument to the following options.

    Inclusion filters

    • hostname : hostname of the node
    • name : resource name of the node, which may be different than hostname
    • type : type name of the node, typically "Node"
    • tags : a set of user defined tags. If you have multiple tags, the separator is either the comma "," for an OR between them, or a plus "+" for an AND between them. Example : "web,prod" (either "web" or "prod"), "web+prod" (both "web" and "prod").
    • os-name : operating system name, e.g. "Linux", "Macintosh OS X"
    • os-family : operating system family, e.g. "windows","unix"
    • os-arch : operating system CPU architecture, e.g. "x86", "x386"
    • os-version : operating system version number

    This field should be written in the Java-Properties format, 1 option per line : key=value.
    You can use Jenkins environment variables ($JOB_NAME, $WORKSPACE, etc) or System environment variables ($OSTYPE, $USER, etc) in your values, and we will expand them when notifying Rundeck.

    Example :

                name = .*
                tags = web+prod
                exclude-os-family = windows
            

    • Type: String
  • tags
    • Type: String
  • shouldWaitForRundeckJob
    If checked, then Jenkins builds will wait for Rundeck job executions to finish. Otherwise, we will just trigger the execution of a Rundeck job, and move on. Also, if the build does not wait for the RunDeck job, the RunDeck job logging will not be tailed into the Jenkins job log.
    • Type: boolean
  • shouldFailTheBuild
    If checked, then a failure to schedule the job execution on Rundeck will fail the Jenkins build. Otherwise, the Rundeck integration won't interact with the result of your Jenkins build (even if Rundeck is down).
    • Type: boolean
  • notifyOnAllStatus
    Normally, Rundeck will only be notified on a SUCCESS status. If checked, Rundeck will be notifed regardless of status. This can be especially useful in post.
    • Type: boolean
  • includeRundeckLogs
    If checked, then Jenkins builds will include the rundeck job output. shouldWaitForRundeckJob is required.
    • Type: boolean
  • tailLog
    If checked, the RunDeck job logging be tailed into the Jenkins job log. Note that RunDeck job logging is never tailed if Wait for RunDeck job to finish ? checkbox is not checked.
    • Type: boolean
  • jobUser

    This is an alternative rundeck userid, which should be used instead of the global configured id. 'User password' is mandatory with 'job user', also a token can be used for authentication.

    • Type: String
  • jobPassword
    • Type: class hudson.util.Secret
  • jobToken
    • Type: class hudson.util.Secret

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.