Skip to content

Get jid from salt statement #147

Open

Description

@mturra-Pro

I use the following code in a pipeline, but in the saltresult the jid (job id) isn't reported.

                   saltresult = salt authtype: 'pam', 
                      clientInterface: local(arguments: "${arguments}", blockbuild: true, function: 'state.apply', jobPollTime: 6, target: "${MINION}", targettype: 'glob'), 
                      credentialsId: 'my-credentialsId', 
                      servername: 'http://saltmaster:8000'

How can I get the jid to use in the pipeline script?

Thanks in advance

Activity

  1. mchugh19 commented on Feb 28, 2021

    @mchugh19

    Hello @mturra-Pro. Can you test with setting blockbuild: false. Rather than having Jenkins wait around for the job results to parse success/failure, this should simply return the jid so you can process as you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions