Workflow Schema Reference
Schema of Kraken Workflow Schema
This is a schema that defines format of Kraken Workflow Schema.
Properties
parent
(string): A name of the parent stage.'root'
if there is no parent. This allows chaining stages.triggers
(object): One or more triggers that cause starting a new run of this stage.parent
(boolean): A parent stage to current one or 'root'. It allows defining a chain of stages.interval
(string)date
(string)cron
(string): A parent stage to current one or 'root'. It allows defining a chain of stages.repo
(object)url
(string)branch
(string)repos
(array)- Items (object)
url
(string)branch
(string)
- Items (object)
interval
OR
(integer): Minimum:1
.OR
(string)
git_cfg
: Git config keys and values passed to -c of the clone command.
manual
(boolean)
parameters
(array)- Items (object)
name
(string)type
(string)default
(string)description
(string)
- Items (object)
configs
(array)- Items (object)
flow_label
(string): A custom label format for flows.run_label
(string): A custom label format for runs.jobs
(array): A list of jobs that are executed in the run. Jobs are executed in parallel.- Items (object)
name
(string): A name of the job.timeout
(integer): An initial timeout of the job. If there are more than 10 historical succeded jobs then timeout is estimated automatically. Minimum:30
.steps
(array): An array of steps that are executed by an agent. Each step has indicated tool that is executing it. Steps are executed in given order.- Items (object)
OR
tool
: Equals'shell'
. A tool that executes provided command in a shell. The field is required.cmd
(string): A command to execute.script
(string): A script code to execute.cwd
(string): A current working directory where the step is executed. Default:'.'
.user
(string): A user that is used to execute a command. Default:'kraken'
.env
(object): A dictionary with environment variables and their values.timeout
(integer): A timeout in seconds that limits time of step execution. It is guareded by an agent. If it is exceeded then the step is arbitrarly terminated. Minimum:30
. Default:60
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.background
(boolean): Indicates if step should be started and pushed to background. The step process is closed at the end of a job. Default:False
.shell_exe
(string): An alternative path or command to shell executable (e.g.: zsh or /usr/bin/fish).
OR
tool
: Equals'git'
. A tool for cloning Git repository. The field is required.checkout
(string): An URL to the repository. The field is required.branch
(string): A branch to checkout. Default:'master'
.destination
(string): A destination folder for the repository. Default is empty ie. the name of the repository.ssh-key
(string): A name of a secret that holds SSH username and key.access-token
(string): A name of secret that contains an access token for GitLab or GitHub.timeout
(integer): A timeout in seconds that limits time of step execution. It is guareded by an agent. If it is exceeded then the step is arbitrarly terminated. Minimum:30
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.git_cfg
(object): Git config keys and values passed to -c of the clone command.
OR
tool
: Equals'artifacts'
. A tool for storing and retrieving artifacts in Kraken global storage. The field is required.action
(string): An action that artifacts tool should execute. Default isupload
. Must be one of:'download'
,'upload'
.source
: A path or list of paths that should be archived or retreived. A path can indicate a folder or a file. A path, in case of upload action, can contain globbing signs*
or**
. A path can be relative or absolute. The field is required.OR
(string): A single path.OR
(array): A list of paths.- Items (string)
destination
(string): A path were the artifact(s) should be stored. In case of download action, if the destination folder does not exist then it is created. Default:'.'
.cwd
(string): A current working directory where the step is executed. Default:'.'
.public
(boolean): Determines if artifacts should be public and available to users in web UI (True
) or if they should be only accessible internally to other stages but only in the same flow (False
). If report_entry is set then public is True. Default:False
.report_entry
(string): A path to HTML file that is an entry to the uploaded report. If present then it sets public to True.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'cache'
. A tool for storing and restoring files from cache. The field is required.action
(string): An action that the tool should perform. Must be one of:'save'
,'restore'
. The field is required.key
(string): A key under which files are stored in or restored from cache.keys
(array): A list of key under which files are restored from cache.- Items (string)
paths
(array): Source paths used instore
action.- Items (string)
expiry
(string): Not implemented yet.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'pylint'
. A tool that allows for static analysis of Python source code. The field is required.pylint_exe
(string): An alternative path or command to pylint. Default:'pylint'
.rcfile
(string): A path to pylint rcfile.modules_or_packages
(string): A path or paths to Python modules or packages that should be checked. The field is required.cwd
(string): A current working directory where the step is executed. Default:'.'
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.timeout
(integer): A timeout in seconds that limits time of step execution. It is guareded by an agent. If it is exceeded then the step is arbitrarly terminated. Minimum:30
.
OR
tool
: Equals'pytest'
. A tool that allows for running Python tests.pytest_exe
(string): An alternative path or command to pytest. Default:'pytest-3'
.params
(string): Parameters passed directly to pytest executable.pythonpath
(string): Extra paths that are used by Python to look for modules/packages that it wants to load.cwd
(string): A current working directory where the step is executed. Default:'.'
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'junit_collect'
. A tool that allows for collecting test results stored in JUnit files. The field is required.file_glob
(string): A glob pattern for searching test result files. The field is required.cwd
(string): A current working directory where the step is executed. Default:'.'
.
OR
tool
: Equals'values_collect'
. A tool that allows for collecting values (metrics, params, etc) from files. The field is required.files
(array): A list of files. The field is required.- Items (object)
name
(string): .namespace
(string): .
- Items (object)
cwd
(string): A current working directory where the step is executed. Default:'.'
.
OR
tool
: Equals'gotest'
. A tool that allows for running Go language tests.go_exe
(string): An alternative path or command togo
.params
(string): Parameters passed directly togo test
.cwd
(string): A current working directory where the step is executed. Default:'.'
.timeout
(integer): A timeout in seconds that limits time of step execution. It is guareded by an agent. If it is exceeded then the step is arbitrarly terminated. Minimum:30
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'nglint'
. A tool that allows for running Angularng lint
, that is performing static analysis of TypeScript in Angular projects.cwd
(string): A current working directory where the step is executed. Default:'.'
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'cloc'
. A tool that allows for running counting lines of code.not-match-f
(string): Filter out files that match to provided regex.exclude-dir
(string): Excluded provided list of directories.cwd
(string): A current working directory where the step is executed. Default:'.'
.attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
OR
tool
: Equals'rndtest'
. A tool that allows for generating random test case results.count
: A number of expected test cases.OR
(integer): Minimum:1
.OR
(string)
override_result
: A result.OR
(integer): Minimum:1
.OR
(string)
attempts
(integer): A number of times the step is retried if if it returns error. Default:1
.sleep_time_after_attempt
(integer): A sleep time between subsequent execution attempts. Default:0
.
- Items (object)
environments
(array): It defines the surroundings of a job execution.- Items (object)
agents_group
(string): A name of agents group. An agent from this group will be used to execute the job. There is a special built-in group,'all'
that gathers all agents. The field is required.executor
(string): An executor that agent is using to execute a job. Must be one of:'local'
,'docker'
,'lxd'
. Default:'local'
.system
: An operating system name or list of such names that should be used for job execution. If this is a list then the number of job instances is multiplied by numer of systems - each instance has its system. There is a special system name,'any'
, that ignores system selection by jobs scheduler. The field is required.OR
(string)OR
(array)- Items (string)
config
(string): Not implemented yet.
- Items (object)
- Items (object)
notification
(object): Notification allows for configuring a notification means that are used to pass an information about stage's run result. There are several communication methods supported.email
(string): It sends run results to indicated email address.slack
(object): It sends run results to indicated Slack channel.channel
(string): Selected Slack channel.
github
(object): It sends run results to associated pull request page on GitHub.credentials
(string): Credentials (user:password) that allows access to the project on GitHub.