Test Puppet code with jobs

In Continuous Delivery (CD), a job is a set of one or more user-defined shell scripts that CD runs on a Puppet-managed Job Hardware node, either inside a container or directly on the node. You can define jobs, with job templates, in the CD web UI or via the API, then you can add them to automated pipelines to run every time new code is committed to a repository.

Jobs are fully customizable and can be written to test your Puppet code. Jobs can leverage the Puppet Development Kit (PDK) and other testing tools by running inside of puppet-dev-tools.

Jobs are run on your job hardware nodes via a Bolt task by Continuous Delivery and follow this general process:

  1. CD creates a job instance that contains information about your job and stores it in the database.

  2. A Bolt command is issued from CD directly to the job hardware node as a Puppet Task to download a copy of your repo and a copy of your job commands on to the job hardware from CD.

  3. Once the download is complete, the Task unpacks the repo and scripts and runs them at the root of your repo (either inside a container or on the node directly).

  4. Once the job run is completed, the Task sends the logs back to CD.