YAML Schema

The buddy.yml file defines all pipelines in the project. Every pipeline consists of a list of actions to be executed. Below you’ll find schemas for both pipelines and actions.

Pipelines schema

The file consists of a list of pipelines:

YAML

- pipeline: "production"
trigger_mode: "MANUAL"
ref_name: "master"
variables:
- key: "username"
value: "Buddy"
settable: false
description: "var_descrption"
- pipeline: "build"
trigger_mode: "ON_EVERY_PUSH"
ref_name: "*"

Properties

NameTypeDescription
pipeline
Required
StringThe ID of the pipeline.
trigger_mode
Required
StringThe trigger mode of the pipeline. Can be one of MANUAL, SCHEDULED or ON_EVERY_PUSH.
ref_typeStringThe ref type that triggers the pipeline. Can be one of BRANCH, TAG, WILDCARD, PULL_REQUEST or NONE.
ref_nameStringThe wildcard, branch, tag or pull request. Automatically set to NONE if not provided.
always_from_scratchBooleanDefines whether or not to upload everything from scratch on every execution.
auto_clear_cacheBooleanDefines whether or not to automatically clear cache before running the pipeline .
no_skip_to_most_recentBooleanDefines whether or not to skip execution to the most recent execution.
do_not_create_commit_statusBooleanDefines whether or not to omit sending commit statuses to Github or Gitlab upon execution.
start_dateiso 8601 utc dateRequired if the pipeline is set to trigger_mode SCHEDULED and no cron is specified. Defines when the pipeline execution should start. Format: 2016-11-18T12:38:16.000Z
delayIntegerRequired if the pipeline is set to trigger_mode SCHEDULED and no cron is specified. Defines the intervals in which the pipeline should be executed (in minutes).
cronStringRequired if the pipeline is set to trigger_mode SCHEDULED and neither start_date nor delay is specified. The standard CRON expression defining the execution schedule.
actions_listString[]The list of actions executed in the pipeline.
variablesVariable[]The list of variables you can use in the pipeline.
ignore_fail_on_project_statusBooleanIf set to true the status of a given pipeline (successful, in-progress or failed) will not impact the project status on the dashboard.
execution_message_templateStringThe title of every execution in this pipeline. By default it is set to $BUDDY_EXECUTION_REVISION_SUBJECT.

Actions schema

Every pipeline contains a list of actions. The actions are executed in the order provided in the .yml file:

YAML

- pipeline: "production"
trigger_mode: "MANUAL"
ref_name: "master"
ref_type: "BRANCH"
execution_message_template: "test"
ignore_fail_on_project_status: "true"
actions:
- action: "Execute: npm test"
type: "BUILD"
docker_image_name: "library/node"
docker_image_tag: "6"
execute_commands:
- "npm install"
- "npm test"
setup_commands:
- "npm install -g gulp grunt-cli"
variables:
- key: "username"
value: "Buddy"
settable: true
description: "var_description"
- action: "Upload files to buddy.server"
type: "FTP"
input_type: "BUILD_ARTIFACTS"
local_path: "/"
login: "buddy"
password: "password"
host: "buddy.server"
port: "21"

Properties

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action.
trigger_timeStringSpecifies when the action should be executed. Can be one of ON_EVERY_EXECUTION, ON_FAILURE or ON_BACK_TO_SUCCESS. The default value is ON_EVERY_EXECUTION.
variablesVariable[]The list of variables you can use the action.
trigger_conditionStringDefines when the build action should be run. Can be one of ALWAYS, ON_CHANGE, ON_CHANGE_AT_PATH, VAR_IS, VAR_IS_NOT or VAR_CONTAINS or VAR_NOT_CONTAINS. Can't be used in deployment actions.
trigger_condition_pathsString[]Required when trigger_condition is set to ON_CHANGE_AT_PATH.
trigger_variable_keyStringRequired when trigger_condition is set to VAR_IS, VAR_IS_NOT or VAR_CONTAINS or VAR_NOT_CONTAINS. Defines the name of the desired variable.
trigger_variable_valueStringRequired when trigger_condition is set to VAR_IS, VAR_IS_NOT or VAR_CONTAINS or VAR_NOT_CONTAINS. Defines the value of the desired variable which will be compared with its current value.
timeoutIntegerThe timeout in seconds.
disabledBooleanWhen set to true the action is disabled. By default it is set to false.
run_next_parallelBooleanWhen set to true, the subsequent action defined in the pipeline will run in parallel to the current action.
run_only_on_first_failureBooleanDefines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.

On top of these three properties every action has a set properties unique to its type. You can read how to define each type in separate articles.