Edit

  • PATCH
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id

Edits a pipeline in the project.

Request

REQUIRED SCOPES
WORKSPACE, EXECUTION_MANAGE
URL PARAMETERS
domainrequired string
The workspace domain.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
namestring
The name of the pipeline.
onstring
The trigger mode of the pipeline. Can be one of CLICK, EVENT, SCHEDULE.
refsstring[]
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.
eventsEvent[]
The list of events for which the pipeline will be triggered. Set it if on is set to EVENT.
trigger_conditionsTriggerCondition[]
The list of trigger conditions to meet so that the pipeline can be triggered.
last_execution_revisionstring
The hash of the commit that is currently deployed on the server.
start_dateiso 8601 utc date
Required if the pipeline is set to on: SCHEDULE and no cron is specified. Defines when the pipeline execution should start.
delayinteger
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).
cronstring
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.
pausedboolean
Defines if the recurrent pipeline executions are paused or not. Restricted to on: SCHEDULE.
always_from_scratchboolean
Defines whether or not to upload everything from scratch on every execution.
auto_clear_cacheboolean
Defines whether or not to automatically clear cache before running the pipeline.
no_skip_to_most_recentboolean
Defines whether or not to skip execution to the most recent.
omit_status_sendingboolean
Defines whether or not to omit sending commit statuses to Github or Gitlab upon execution.
target_site_urlstring
The URL of the target website.
disabledboolean
Set it, if you want the pipeline to be disabled.
disabled_reasonstring
Specifies the reason for disabling the pipeline.
concurrent_pipeline_runsboolean
Defines whether or not the pipeline can be run concurrently.
git_changeset_basestring
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.
filesystem_changeset_basestring
Defines changeset calculation method whenever deployment action has input_type set to BUILD_ARTIFACTS. Default set to DATE_MODIFIED. Possible values: DATE_MODIFIED, CONTENTS.
permissionsPipelinePermissions
Define to set permissions for the pipeline.

Last modified on Oct 15, 2024

Example:

curl -X PATCH "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Tests",
  "on": "EVENT",
  "events": [
    {
      "type": "PUSH",
      "refs": [
        "refs/heads/master"
      ]
    }
  ],
  "execution_message_template": "test",
  "always_from_scratch": true,
  "auto_clear_cache": true,
  "no_skip_to_most_recent": true,
  "filesystem_changeset_base": "CONTENTS",
  "do_not_create_commit_status": true,
  "ignore_fail_on_project_status": true,
  "concurrent_pipeline_runs": true,
  "permissions": {
    "others": "DENIED",
    "users": [
      {
        "id": 1,
        "access_level": "READ_WRITE"
      }
    ],
    "groups": [
      {
        "id": 1,
        "access_level": "READ_ONLY"
      }
    ]
  }
}'
EXAMPLE RESPONSE
{ "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": "Tests", "on": "EVENT", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "execution_message_template": "test", "filesystem_changeset_base": "CONTENTS", "last_execution_status": "INITIAL", "last_execution_revision": null, "create_date": "2016-03-29T07:12:30.675Z", "always_from_scratch": true, "auto_clear_cache": true, "no_skip_to_most_recent": true, "do_not_create_commit_status": true, "ignore_fail_on_project_status": true, "concurrent_pipeline_runs": 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" }, "actions": [], "permissions": { "others": "DENIED", "users": [ { "id": 2, "access_level": "READ_ONLY" } ], "groups": [ { "id": 1, "access_level": "READ_ONLY" } ] } }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999