Update pipeline
Updates a pipeline in the project. If you want to manage the pipelines, use these methods: add, edit, delete.
Required scopes: WORKSPACE
, EXECUTION_MANAGE
Resource URL
PATCH /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id
URL Parameters
Name | Type | Description |
---|---|---|
domain Required | String | The workspace domain. |
pipeline_id Required | Integer | The numerical ID of the desired pipeline. |
project_name Required | String | The name ID of the project. |
POST Parameters
Name | Type | Description |
---|---|---|
ref_name | String | The wildcard, branch, tag or pull request. |
ref_type | String | The branch or tag that triggers the pipeline. Can be one of BRANCH , TAG , WILDCARD , PULL_REQUEST or NONE . |
trigger_mode | String | The trigger mode of the pipeline. Can be one of MANUAL , SCHEDULED or ON_EVERY_PUSH . |
name | String | The name of the pipeline. |
last_execution_revision | String | The hash of the commit that is currently deployed on the server. |
start_date | ISO 8601 UTC date | The date when the recurrent pipeline should start. Restricted to and required if the trigger_mode is SCHEDULED . |
delay | Integer | The delay between executions of recurrent pipeline. Restricted to and required if the trigger_mode is SCHEDULED . |
run_always | Boolean | Defines whether or not to execute only if there were changes in the branch since the last execution. Restricted to trigger_mode SCHEDULED . |
paused | Boolean | Defines if the recurrent pipeline executions are paused or not. Restricted to trigger_mode SCHEDULED . |
always_from_scratch | Boolean | Defines whether or not to upload everything from scratch on every execution. |
auto_clear_cache | Boolean | Defines whether or not to automatically clear cache before running the pipeline . |
no_skip_to_most_recent | Boolean | Defines whether or not to skip execution to the most recent. |
omit_status_sending | Boolean | Defines whether or not to omit sending commit statuses to Github or Gitlab upon execution. |
target_site_url | String | The URL of the target website. |
Example
Request
PATCH https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2
JSON
{"name": "Live mirror","trigger_mode": "MANUAL","ref_type": "BRANCH","ref_name": "master","last_execution_revision": "184623451d99d95e75e82b687ba4e1d4e087b4ef","always_from_scratch": true,"auto_clear_cache": true,"no_skip_to_most_recent": true}
Sample Response
HTTP
Status: 200 OKX-Rate-Limit-Limit: 1X-Rate-Limit-Remaining: 999
JSON
{"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2","html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2","id": 2,"name": "Live mirror","trigger_mode": "MANUAL","ref_type": "BRANCH","ref_name": "master","last_execution_status": "SUCCESSFUL","last_execution_revision": "184623451d99d95e75e82b687ba4e1d4e087b4ef","create_date": "2016-03-29T06:10:10Z","always_from_scratch": true,"auto_clear_cache": true,"no_skip_to_most_recent": true,"project": {"url": "https://api.buddy.works/workspaces/buddy/projects/company-website","html_url": "https://app.buddy.works/buddy/company-website","name": "company-website","display_name": "Company Website","status": "ACTIVE"},"creator": {"url": "https://api.buddy.works/workspaces/buddy/member/1","html_url": "https://app.buddy.works/buddy/profile/1","id": 1,"name": "Mike Benson","avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png","title": "Creative director"},"actions": [{"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5","html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit","id": 5,"name": "Upload files to dev","type": "FTP","trigger_time": "ON_EVERY_EXECUTION","last_execution_status": "SUCCESSFUL"}]}