Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54984

PipelineJob() publishers deprecated - how to send a notifications

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      Hi,

      I'm using a jobs DSL plugin (1.70) & Jenkins (2.152) to create a bunch of pipelineJobs (via seed job).

      Now I need to be able to send a Slack notifications in case the of build failure.

      Looking at this doc https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-publishers it seems that publishers is deprecated for pipelineJob() but still OK for job() calls.

      I don't want to use a functionality which is going to be removed in feature and thus break Jenkins jobs.

       

      Could you please advise how can I trigger some sort of postBuild script/job in pipelineJob() to send a notification ?

      Is there any replacement/equivalent for publishers in pipelineJob()  ?

       

      PS: I've got slackSend (slack plugin) working fine in a test scripted Pipeline job but cannot figure out how to add it to the seed job which calls  pipelineJob() to create all the other jobs (many in number).

       

      Thanks,

      Constantin

       

       

            daspilker Daniel Spilker
            constantinb Constantin Bugneac
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: