Jenkins job builder and post build task

893 views
Skip to first unread message

Harsh Desai

unread,
Aug 8, 2013, 4:02:54 PM8/8/13
to jenkins...@googlegroups.com
Hi

I am using jenkins job builder to create my jenkins job. In my YAML configuration, I have the following config at the bottom on my job to have a post-build-task. This is the same config that is given here

    publishers:
        - post-tasks:
          - matches:
            - log-text: line to match
              operator: AND
            - log-text: line to match
              operator: OR
            - log-text: line to match
              operator: AND
          escalate-status: false
          run-if-job-successful: false
          script: |
            echo "Here goes the task script"


However, I don't see a post build task in my jenkins job when I create it using this config. Has anyone tried using this feature?

Thanks
Harsh

Richard Bywater

unread,
Aug 8, 2013, 5:35:54 PM8/8/13
to jenkins...@googlegroups.com
Are you running a pretty new version of jenkins-job-builder? That task was only added on July 19th.

Richard.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

William Soula

unread,
Aug 9, 2013, 8:31:28 AM8/9/13
to jenkins...@googlegroups.com
Silly question, do you have the plugin installed?

Will

Harsh Desai

unread,
Aug 9, 2013, 2:34:43 PM8/9/13
to jenkins...@googlegroups.com, willia...@drillinginfo.com
Yes, I do have it installed. I can add a post-build-task through the jenkins Web GUI and the plugin works. The issue is the post-build-task does not get created when I use the jenkins job builder.

I am using the master branch of the openstack-infra/jenkins-job-builder (https://github.com/openstack-infra/jenkins-job-builder)

Jenkins version: 1.509.1

~Harsh

William Soula

unread,
Aug 9, 2013, 2:52:45 PM8/9/13
to jenkins...@googlegroups.com
Looks like you have a bad yaml file.  If you take two space off the post-tasks line and the matches line it should work.  I would also take two space off the log-test lines and operator lines but that doesn't appear to be necessary.


publishers:
      - post-tasks:
        - matches:
            - log-text: line to match
              operator: AND
            - log-text: line to match
              operator: OR
            - log-text: line to match
              operator: AND
          escalate-status: false
          run-if-job-successful: false
          script: |
            echo "Here goes the task script"

Will
Reply all
Reply to author
Forward
0 new messages