Skip to content

Manifest

diamond_dragon edited this page Apr 28, 2021 · 6 revisions

Quick Start

Draft of workflow template can be created using the following command:

CodeReview.Orchestrator.exe new -o manifest.yaml

Output of this command may look as follows:

imports:
  folderPath: ./imports
sources:
  folderPath: ./src
artifacts:
  folderPath: ./artifacts
  exportOnCompletion: true
variables:
  MY_VAR_1: Value1
  MY_VAR_2: Value2
activities:
  git:
    image: dragon/jetbrains
    environment:
      MY_VAR_1: Value1
      MY_VAR_2: Value2
    volumes:
      useWindowsDefaults: false
      sources: /src
      artifacts: /artifacts
      imports: /imports
    settings:
      waitTimeoutSeconds: 3000
    requirements:
      os: Linux
      features:
      - feature1
    command:
    - mkdir
    - /mydir

Manifest Description

Typical manifest may look as follows:

imports:
  folderPath: ./imports
sources:
  folderPath: ./src
artifacts:
  exportOnCompletion: true
variables: 
  srcPath: /src
activities:
  git:
    image: godeltech/codereview.tools.gitprovider
    environment:
      GIT_REPOSITORY_URL: https://github.com/GodelTech/CodeReview.Orchestrator.git
      GIT_BRANCH: main
    volumes:
      sources: ${var.srcPath}
  roslyn:
    image: godeltech/codereview.analyzers.roslyn
    environment:
      SOLUTION_FILE_PATH: /src/CodeReview.Orchestrator.sln
    volumes:
      sources: ${var.srcPath}
  roslyn-converter:
    image: godeltech/codereview.file-converter
    command:
    - roslyn
    - --output
    - /artifacts/rolsyn-result.zip
    - --folder
    - /artifacts
    - --src
    - ${var.srcPath}/
    - --mask
    - '*.roslyn.json'    
  

Manifest properties description

TBD

Variables

TBD

Manifest Best Practices

The following guidelines may simplify creation and maintenance of CodeReview.Orchestrator manifests:

  • Avoid explicit declaration of parameters if values match defaults. This approach makes manifests shorter and easier to understand.
  • Consider usage of long parameter names. Many command line tools support long and short command line parameter names: -d and --destination. Long parameter names provide better understanding of their purpose and eliminate a need to study documentation of tool to understand parameter.
  • Use variables to avoid duplication of the same parameters in multiple places.
  • Use environent variables to pass security information rather than hardcode passwords and tokens in manifests.

Clone this wiki locally