-
Notifications
You must be signed in to change notification settings - Fork 0
Manifest
fire-dragon edited this page May 13, 2021
·
6 revisions
Draft of workflow template can be created using the following command:
CodeReview.Orchestrator.exe new -o manifest.yamlOutput 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
- /mydirTypical 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'
imports section defines settings used to initialize imports volume. List of properties can be found in the following table:
| Property | Mandatory | Default Value | Description |
|---|---|---|---|
folderPath |
false |
./imports |
Specifies location of folder to import into imports container. If relative path is specified manifest location is used as current directory. If folder specified in this property doesn't exist no import is performed. |
sources section defines settings used to initialize sources volume. List of properties can be found in the following table:
| Property | Mandatory | Default Value | Description |
|---|---|---|---|
folderPath |
false |
./src |
Specifies location of folder to import into src container. If relative path is specified manifest location is used as current directory. If folder specified in this property doesn't exist no import of source code is performed. |
artifacts section defines settings used to initialize artifacts volume. List of properties can be found in the following table:
| Property | Mandatory | Default Value | Description |
|---|---|---|---|
folderPath |
false |
./artifacts |
Specifies location of folder to export content of artifacts volume data. |
exportOnCompletion |
false |
false |
Specifies if artifact volume needs to be exported or not after workflow execution is completed. |
TBD
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:
-dand--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.