`/templates` contains the templates for the pipeline. This includes the `globals.yaml` file, which contains variable references needed for each CI/CD job to run and outlines the jobs required to run. This directory will also contain the template for the default plugin pipeline. In the event special templates are needed (say, for example, if a particular plugin type needs a modified pipeline). These special cases would have their own `.yaml` files which override aspects of the `globals.yaml` configuration as needed.
`/stages` contains the stages which are involved in pipeline execution. Each stage of the pipeline has its own folder within this directory containing a `base.yaml` file. The `base.yaml` file dictates the actions and requirements needed for the stage to execute. Additional `.yaml` files can be present within the stage directories in order to separate the jobs which occur within that particular stage.
## Contributor project requirements for ironbank-plugins-pipeline use:
The following steps outline how the custom CI configuration path is set:
The following is provided: `templates/default.yaml@ironbank-tools/ironbank-plugins-pipeline`.
This will point the project towards the default pipeline in the ironbank-plugin-pipeline.
## Pipeline artifacts
To access artifacts for each job, select the job in the UI on the `CI/CD -> Pipelines` page by clicking on the button for that job. In the top right hand corner of the screen, there is a box which says "Job artifacts" and contains buttons which say "Keep", "Download", and "Browse". Select the button which corresponds to the option you want.
Pipeline artifacts are kept indefinitely, per requirements.
Because some of the plugins which are scanned are proprietary, requiring a paid license, or not publicly available, the actual plugin software file(s) will not be retained as publicly accessible artifacts in the pipeline.
## Pipeline stages
#### preprocess
This stage is used to clone the `ironbank-pipeline` repository from GitLab so that the templates/stages contained within the project can be utilized in later pipeline stages.
Job artifacts:
- pipeline templates/scripts/etc.
#### preflight
The `preflight` stage performs two functions, which are described below:
- checks the project which is running through the plugins pipeline for required files. The `files check` job will check for the existence of the following files and/or directories within the project repo which is being run through the pipeline:
- README (required file)
- Dockerfile (required file)
- plugins_manifest.yaml (required file)
- LICENSE (required file)
- checks and validates the `plugins_manifest.yaml` file. The schema for the file is enforced and the pipeline will fail during this job in the event the file is not in a valid format.