Add a job
Before adding a job, be sure to configure job hardware and install any additional software required by your job, such as Docker or Puppet Development Kit (PDK). You can add jobs to CD using the CD web UI or via the API.
To add a job to your CD instance using the web UI:
- In the CD web UI, click Jobs > New job.
- Provide details on how to refer to this job in the Name this job section.
- Enter a description for your job in the Description field.
- Define what commands to run in the Job commands section. Job commands are contained in shell scripts that Continuous Delivery runs on your job hardware nodes.
- This is the primary script that will be run with every job instance.
- Optionally, if you would like to configure scripts to run on the success or failure of the job, click Add commands to run after the job.
- On success: Enter the commands to run if your primary job script returns 0.
- On failure: Enter the commands to run if your primary job script returns non-zero.
- Specify what hardware to run the job on in the Where can this job run? section. Make sure to Configure job hardware and install any additional software required by your job prior to completing this.
- Click Save job. If you want to add a secret to a job, you must save the job first before you can add a secret.