Task Configuration

Overview of YAML Layout

inspecode:
  tasks:
    - name: <string>
      type: <string>
      dockerfile: <string>
      pre-tasks: <string|list>
      artifacts: <mapping|list>
      reports: <mapping|list>
      machine:
        cpu: <string>
      thresholds:
        num-issues: <number|mapping>
      options: <mapping|list>
    - ...
Field: name

Specify the name of a task. You can define the dependencies among tasks in pre-tasks by using the names defined here. Task names can contain alphanumeric characters, underscore (_), and dash (-). The maximum length of task names is 20 characters.

Field: type

Specify the type of a task. The default value is docker-build. As of now, Inspecode supports only docker-build.

Field: dockerfile

Specify the path to the Dockerfile that you want to run. This field is valid only when type is docker-build.

Field: pre-tasks

Specify the names of tasks that you want to run before this task. You can define any workflow by using pre-tasks. Inspecode parallelizes your tasks as much as possible under the conditions given in pre-tasks.

Field: artifacts

You can store any artifacts in Inspecode. Please note that Inspecode automatically delete artifacts in 30 days.

(Mapping notation)

You can store an artifact from any Docker stage. from specifies the Docker stage where the artifact is generated and defaults to the last stage. path specifies the path of the artifact. If path is a directory, Inspecode automatically compresses it to ZIP.

artifacts:
  from: <stage>
  path: <path-to-artifact>
(List notation)

You can store multiple artifacts using the list notation.

artifacts:
  - from: <stage>
    path: <path-to-artifact>
  ...
Field: reports

You can provide Static Analysis Results Interchange Format (SARIF) files and view the issues in Inspecode. Please read SARIF Support page to see the supported SARIF properties.

(Mapping notation)

You can place SARIF files in any Docker stage. from specifies the Docker stage where the SARIF files are placed and defaults to the last stage. path specifies the path of the SARIF file. If path is a directory, Inspecode finds files with the following names under the directory, and parses all the files found.

  • inspecode.sarif
  • inspecode.sarif.json
  • inspecode-*.sarif
  • inspecode-*.sarif.json

Note: * is a wildcard character.

The default value of path is /.rocro.

reports:
  from: <stage>
  path: <path-to-reports>
(List notation)

You can specify multiple reports using the list notation.

reports:
  - from: <stage>
    path: <path-to-reports>
  ...
Field: machine

The notation is the same as that of the tool configuration. See here.

Field: thresholds

The notation is the same as that of the tool configuration. See here.

Field: options

Specify options for the task. As of now, --build-arg is the only supported option. By specifying --build-arg, you can pass in ARG values at docker build time.

For example:

options:
  --build-arg:
    - XXX=aaa
    - YYY=bbb

results matching ""

    No results matching ""