ironic/doc/source/contributor/adding-new-job.rst
Jay Faulkner f6191f2969 Fix lint issues with documentation
The doc8 linter found several syntax problems in our docs; primarily a
large number of places we used single-backticks to surround something
when we should've used double-backticks.

This is frontrunning a change that will add these checks to CI.

Change-Id: Ib23b5728c072f2008cb3b19e9fb7192ee5d82413
2024-10-29 14:59:28 -07:00

2.3 KiB

Adding a new Job

Are you familiar with Zuul?

Before start trying to figure out how Zuul works, take some time and read about Zuul Config and the Zuul Best Practices.

Where can I find the existing jobs?

The jobs for the Ironic project are defined under the zuul.d folder in the root directory, that contains three files, whose function is described below.

  • ironic-jobs.yaml: Contains the configuration of each Ironic Job converted to Zuul v3.
  • legacy-ironic-jobs.yaml: Contains the configuration of each Ironic Job that haven't been converted to Zuul v3 yet.
  • project.yaml: Contains the jobs that will run during check and gate phase.

Create a new Job

Identify among the existing jobs the one that most closely resembles the scenario you want to test, the existing job will be used as parent in your job definition. Now you will only need to either overwrite or add variables to your job definition under the vars section to represent the desired scenario.

The code block below shows the minimal structure of a new job definition that you need to add to ironic-jobs.yaml.

- job:
    name: <name of the new job>
    description: <what your job does>
    parent: <Job that already exists>
    vars:
      <var1>: <new value>

After having the definition of your new job you just need to add the job name to the project.yaml under check and gate. Only jobs that are voting should be in the gate section.

- project:
    check:
      jobs:
        - <name of the new job>
    gate:
      queue: ironic
      jobs:
        - <name of the new job>