Run
Runs an execution of a pipeline.
Required scopes: WORKSPACE
, EXECUTION_RUN
Resource URL
POST /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/executions
URL Parameters
Name | Type | Description |
---|---|---|
domain Required | String | The workspace domain. |
pipeline_id Required | Integer | The numerical ID of the desired scenario. |
project_name Required | String | The name ID of the project. |
POST Parameters
Name | Type | Description |
---|---|---|
to_revision Required | Object | The object containing the revision field in which a revision or HEAD will be provided from the repository that will be executed in the pipeline. |
variables | Variable[] | The list of variables to set as parameters for the pipeline. |
branch | Object | The object containing the name field with the name of the branch to be executed when a pipeline has multiple refs or one of the refs is a wildcard. |
tag | String | The name of the tag to be executed when a pipeline has multiple refs or one of the refs is a wildcard. |
comment | String | Execution comment. |
refresh | Boolean | Deploy from scratch. |
clear_cache | Boolean | Clear cache before running the pipeline. |
priority | String | Execution priority. Can be one of LOW , NORMAL or HIGH . Default is NORMAL . |
actions_to_run | Integer[] | Send the actions' IDs list to be run in this execution. If not sent, it will be run in accordance with the pipeline's definition. |
Example
Request
POST https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions
JSON
{
"to_revision": {
"revision": "HEAD"
},
"comment": "hotfix",
"clear_cache": true,
"priority": "HIGH",
"variables": [
{
"key": "version",
"value": "1.0"
},
{
"key": "pass",
"value": "qwerty",
"encrypted": true
}
],
"actions_to_run": [
1,
2
]
}
Request
POST https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions
JSON
{
"branch": {
"name": "master"
},
"comment": "hotfix"
}
Request
POST https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions
JSON
{
"tag": {
"name": "v1.0"
},
"comment": "hotfix"
}
Sample Response
HTTP
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
JSON
{
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/executions/3",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56fa37f499f1e10c105fb388",
"id": 3,
"start_date": "2016-03-29T08:08:20.205Z",
"finish_date": null,
"priority": "HIGH",
"triggeredOn": "CLICK",
"refresh": false,
"status": "INPROGRESS",
"comment": "hotfix",
"branch": {
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/branches/master",
"html_url": "https://app.buddy.works/buddy/company-website/repository/branch/master",
"name": "master",
"default": true
},
"from_revision": {
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08",
"html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08",
"revision": "506a3963507943d6908154f4bc9646e829128a08",
"author_date": "2016-01-19T12:36:33Z",
"commit_date": "2016-01-19T12:36:33Z",
"message": "init repo\n",
"committer": {
"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"
},
"author": {
"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"
}
},
"to_revision": {
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/commits/506a3963507943d6908154f4bc9646e829128a08",
"html_url": "https://app.buddy.works/buddy/company-website/repository/commit/506a3963507943d6908154f4bc9646e829128a08",
"revision": "506a3963507943d6908154f4bc9646e829128a08",
"author_date": "2016-01-19T12:36:33Z",
"commit_date": "2016-01-19T12:36:33Z",
"message": "init repo\n",
"committer": {
"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"
},
"author": {
"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"
}
},
"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"
},
"pipeline": {
"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": "dev",
"on": "CLICK",
"refs": [
"refs/heads/master"
],
"last_execution_status": "INPROGRESS",
"last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08"
},
"action_executions": [
{
"status": "INPROGRESS",
"progress": 0.0,
"action": {
"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": "INPROGRESS"
}
}
]
}
Last modified on November 7, 2022