Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Structure

The Jenkins DevOps pipeline is defined in a “Jenkinsfile” (by default named Jenkinsfile ) and has the following structure (most detail omitted). Paired curly braces ”{ }" denote the start and end of a scoped section. Comments are “/* */” (inline) or “//” (til end of line)

...

The parameters section enumerates the parameters to the pipeline with their default values. The four parameters used in the template, and their meanings are discussed in /wiki/spaces/MCIDOC/pages/2244149249741310474

Info

note that parameters are immutable, and once set at pipeline (or scope section) start, cannot be changed

...

This is the first stage in the pipeline and it is tasked with deploying changed project assets to the CI (continuous integration) project. WithCredentialsprovides appropriate credentials (using the credentials plugin) to the rest of the steps. change from mci-user if you are using a different user. Each bat step invokes the MettleCI CLI to perform one of the deployment tasks. Refer to the MettleCI - Auto-Generated CLI Command Syntax Reference for details of what each step is doing. The label, chosen to be descriptive of the step task, becomes the step text in the Blue Ocean display of the pipeline. If a step aborts that ends the steps part of the stage. After the steps conclude, by error or by reaching the end, the post section is evaluated. Although there are other values such as changed, fixed, etc, using always ensures the section is always executed to process test results (here, the result of the compilations) and then cleanup.

...

After a successful deployment the pipeline will perform some tests, compliance and the unit tests. These can be performed in parallel as there is no interdependence, so we use the parallel{} construct to nest the stage invocations. As before, refer to the MettleCI - Auto-Generated CLI Command Syntax Reference for details of what each step is doing.

...

The template pipeline has three promotion deployments, each of which is essentially the same as the initial deploy but directed at a different project. Our template assumes that all three deployments are to the same DataStage server, but the parameter blocks are at the individual promotion level so you can change these as necessary. You can reduce or increase (by deleting or copying code blocks) the number as necessary. These can be performed in parallel as there is no interdependence, so we again use the parallel{} construct to nest the stage invocations. As before, refer to the MettleCI - Auto-Generated CLI Command Syntax Reference for details of what each step is doing. The “innards” of each promotion step, save the first are elided in the following code snippet to focus on the structure.

...