Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Puppet on the plugin site for more information.

Usage

This plugin builds on top of deployment notification plugin and lets Puppet users track when/where/what files are deployed, and trigger other activities after deployments have happened. See deployment notification plugin for more details.

This plugin adds the ability to parse the YAML report format from Puppet. The easiest way to do this is to use the built-in HTTP reporter and have it sent to your Jenkins at '/puppet/report'. The APITOKEN is the API token of a valid Jenkins user:

$ puppet apply --reports http --reporturl=http://USER:APITOKEN@server/jenkins/puppet/report

With CSRF protection enabled, the above will fail because puppet will try to POST the content without proper crumb. So alternatively, you can use the jenkinstracking report processor from puppet-jenkinstracking module:

$ puppet apply --reports jenkinstrcking --reporturl=http://USER:APITOKEN@server/jenkins/

.. or use store report processor, which writes the YAML report as a file, and then send them over Jenkins SSH like this:

$ puppet apply --reports store --reportdir=/var/log/puppet
$ for f in (ls /var/log/puppet/*/*); do cat $f | ssh -p PORT user@jenkins submit-puppet-report && rm $f; done

Instead of Jenkins SSH, you can also use Jenkins CLI:

cat $f | java -jar jenkins-cli.jar -s http://server/jenkins/puppet/report submit-puppet-report

The latter two approach can be combined with remote file transfer, which would be convenient for deployments where these servers cannot see Jenkins due to the network topology.

Recognized resource type

This plugin currently tracks the use of file resources and pick up fingerprints from there automatically.

Our plan is to auto-recognize other resources where it makse sense, and also provide a custom puppet resource for recording fingerprints of arbitrary files.

Tracking files explicitly

If the resource type auto-recognition is insufficient and you want Jenkins to explicitly track fingerprints of specific files, use the tracking resource from puppet-jenkinstracking in your manifest like this:

track { '/usr/share/foo/foo.war'}

Changelog

Version 1.1 (Dec 21, 2015)

  • Improve logging for troubleshooting purposes
  • Puppet plugin compatible with deployment-notification-1.2
  • PuppetEvent support for the "Track" events
  • Add a Plugin name/description

Version 1.0 (Feb 17, 2014)

  • Initial release
  • No labels

5 Comments

  1. Unknown User (1042907p)

    Hi, 

    I have the Jenkins URL configured in puppet.conf. However in  not  sure  whether  the yaml reports  are getting posted. Any idea where to check 

  2. Unknown User (cleclerc)

    When using CloudBees RBAC security, don't forget to grant "Overall/Read" to anonymous if you don't provide credentials in the http call (e.g. http://jenkins.localdomain:8090/puppet/report)

    1. Unknown User (cleclerc)

      More important for CloudBees RBAC authorisation: grant the "Deployment Notifications/Record" permission to the user that performs the http call (anonymous or an authenticated user, the later is recommended).

      Deployment Notifications/Record

  3. Unknown User (esmalling)

    Can anyone here post an example of how to configure your master to send these reports?   (The `--reporturl` arg isn't available to me when using mcollective to trigger agent runs.)

    1. Unknown User (esmalling)

      Never mind - I got it. :)

      FYI (in case anyone else is in the same boat), what I did:

      1. On puppet master, edit the puppet.conf, adding "reports = http" and "reporturl = http://user@token:jenkinsserver/puppet/report"  (actually, I have 'reports = puppetdb,http')
      2. restart puppet master
      3. ensure the user you provided in the url has the access to post to "Deployment Notifications" if you are using matrix security.