The documentation applies to models in the new version buddy.v1.1.0
For the REST API to work correctly, you should send the header X-Buddy-Media-Type: buddy.v1.1.0
You can read more about changes here.
Creates a new pipeline in the project.
Event schema
Here's how to define the event triggering the pipeline:
The trigger mode of the pipeline. Can be one of 'CLICK', 'EVENT', 'SCHEDULE'.
refsoptional string[]
Set it if 'on' is set to 'CLICK' or 'SCHEDULE'. The list of refs for which the pipeline will be triggered. Automatically set to 'NONE' if not provided.
eventsoptional Event[]
The list of events for which the pipeline will be triggered. Set it if 'on' is set to 'EVENT'.
typerequired string
The type of the event. Available values: 'PUSH', 'CREATE_REF', 'DELETE_REF'.
refsrequired string
The list of refs for which the pipeline will be triggered in the given event.
tagsoptional string
Runs the pipeline on the worker with a tag that matches at least one of those specified in the array.
Defines when the action should be run. Can be one of 'ON_CHANGE', 'ON_CHANGE_AT_PATH', 'VAR_IS', 'VAR_IS_NOT', 'VAR_CONTAINS', 'VAR_NOT_CONTAINS', 'VAR_LESS_THAN', 'VAR_LESS_THAN_OR_EQUAL', 'VAR_GREATER_THAN', 'VAR_GREATER_THAN_OR_EQUAL', 'DAY', 'HOUR', 'TRIGGERING_USER_IS', 'TRIGGERING_USER_IS_NOT', 'TRIGGERING_USER_IS_IN_GROUP', 'TRIGGERING_USER_IS_NOT_IN_GROUP', 'SUCCESS_PIPELINE', 'ACTION_STATUS_IS' or 'ACTION_STATUS_IS_NOT' (last two can only be set in an action).
trigger_condition_pathsoptional string[]
Required when 'trigger_condition' is set to 'ON_CHANGE_AT_PATH'.
trigger_variable_keyoptional string
Required when 'trigger_condition' is set to 'VAR_IS', 'VAR_IS_NOT' or 'VAR_CONTAINS' or 'VAR_NOT_CONTAINS', 'VAR_LESS_THAN', 'VAR_LESS_THAN_OR_EQUAL', 'VAR_GREATER_THAN', 'VAR_GREATER_THAN_OR_EQUAL'. Defines the name of the desired variable.
trigger_variable_valueoptional string
Required when 'trigger_condition' is set to 'VAR_IS', 'VAR_IS_NOT' or 'VAR_CONTAINS' or 'VAR_NOT_CONTAINS', 'VAR_LESS_THAN', 'VAR_LESS_THAN_OR_EQUAL', 'VAR_GREATER_THAN', 'VAR_GREATER_THAN_OR_EQUAL'. Defines the value of the desired variable which will be compared with its current value.
trigger_hoursoptional integer[]
Available when 'trigger_condition' is set to 'HOUR'. Defines the time – by default running from 1 to 24.
trigger_daysoptional integer[]
Available when 'trigger_condition' is set to 'DAY'. Defines the days running from 1 to 7 where 1 is for Monday.
zone_idoptional string
Available when 'trigger_condition' is set to 'DAY' or 'HOUR'. Defines the timezone (by default it is UTC) and takes values from here.
trigger_project_nameoptional string
Required when 'trigger_condition' is set to 'SUCCESS_PIPELINE'. Defines the name of the project in which the 'trigger_pipeline_name' is.
trigger_pipeline_nameoptional string
Required when 'trigger_condition' is set to 'SUCCESS_PIPELINE'. Defines the name of the pipeline.
trigger_action_nameoptional string
Required when 'trigger_condition' is set to 'ACTION_STATUS_IS' or 'ACTION_STATUS_IS_NOT'. Defines the name of the action.
trigger_statusoptional string
Required when 'trigger_condition' is set to 'ACTION_STATUS_IS' or 'ACTION_STATUS_IS_NOT'. Defines the status that the action should or shouldn't have. Can be one of 'SUCCESSFUL', 'SKIPPED', 'SUPRESSED' or 'FAILED'.
trigger_useroptional string
Required when 'trigger_condition' is set to 'TRIGGERING_USER_IS' or 'TRIGGERING_USER_IS_NOT'. Defines the email address of the user.
trigger_groupoptional string
Required when 'trigger_condition' is set to 'TRIGGERING_USER_IS_IN_GROUP' or 'TRIGGERING_USER_IS_NOT_IN_GROUP'. Defines the name of the group.
always_from_scratchoptional boolean
Defines whether or not to upload everything from scratch on every execution.
auto_clear_cacheoptional boolean
Defines whether or not to automatically clear cache before running the pipeline.
no_skip_to_most_recentoptional boolean
Defines whether or not to skip execution to the most recent execution.
do_not_create_commit_statusoptional boolean
Defines whether or not to omit sending commit statuses to Github or Gitlab upon execution.
start_dateoptional iso 8601 utc date
Required if the pipeline is set to 'on: SCHEDULE' and no 'cron' is specified. Defines when the pipeline execution should start. Format: 2016-11-18T12:38:16.000Z
delayoptional integer
Required if the pipeline is set to 'on: SCHEDULE' and no 'cron' is specified. Defines the intervals in which the pipeline should be executed (in minutes).
cronoptional string
Required if the pipeline is set to 'on: SCHEDULE' and neither 'start_date' nor 'delay' is specified. The standard CRON expression defining the execution schedule.
pausedoptional boolean
Defines if the recurrent pipeline executions are paused or not. Restricted to 'on: SCHEDULE'.
ignore_fail_on_project_statusoptional boolean
If set to 'true' the status of a given pipeline will not impact the project status on the dashboard.
execution_message_templateoptional string
The title of every execution in this pipeline. By default, it is set to '$BUDDY_EXECUTION_REVISION_SUBJECT'.
target_site_urloptional string
The URL of the target website.
disabledoptional boolean
Set it, if you want the pipeline to be disabled.
disabled_reasonoptional string
Specifies the reason for disabling the pipeline.
concurrent_pipeline_runsoptional boolean
Defines whether or not the pipeline can be run concurrently.
fetch_all_refsoptional boolean
When the pipeline is run, Buddy fetches only one Git reference to the pipeline filesystem (branch, tag, or pull request). If the option is set to 'true', Buddy will be forced to fetch all Git references.
permissionsoptional PipelinePermissions
Define to set permissions for the pipeline.
othersrequired string
AccessLevel for the group Others. Can be one of 'DENIED', 'DEFAULT', 'READ_ONLY', 'RUN_ONLY', or 'READ_WRITE'. Default setting is 'DEFAULT' (Project role).
usersoptional UserPermission[]
The list of users who will be granted a permission other than the Others group.
idrequired integer
The user ID.
access_levelrequired string
AccessLevel for a user. Can be one of 'DENIED', 'DEFAULT', 'READ_ONLY', 'RUN_ONLY', or 'READ_WRITE'.
groupsoptional GroupPermission[]
The group who will be granted a permission other than the Others group.
idrequired integer
The group ID.
access_levelrequired string
AccessLevel for a group. Can be one of 'DENIED', 'DEFAULT', 'READ_ONLY', 'RUN_ONLY', or 'READ_WRITE'.
change_set_baseoptional string
Defines the way the changeset for deployments and trigger conditions between subsequent executions in the pipeline will be calculated. Available values: 'LATEST_RUN', 'LATEST_RUN_MATCHING_REF', 'PULL_REQUEST'. By default, it is set to 'LATEST_RUN'.
cache_scopeoptional stringBETA
Docker cache scope. Available values: 'WORKSPACE', 'PROJECT', PIPELINE'. By default, it is set to 'PIPELINE'.
description_requiredrequired Boolean
The default value is false. If set to true and the user does not provide a description when starting a pipeline, the pipeline won't run.
pause_on_repeated_failuresrequired Integer
Pauses the pipeline after n failed pipeline runs. Restricted to pipelines set to 'on: SCHEDULE'. Possible values: 1-100 (the default value is 100).
git_config_refrequired String
Information where the pipeline configuration should be stores. Available values: NONE, DYNAMIC, FIXED. By default, it's NONE.