跳到主要内容

Azure

Learn how to add and configure the \"Azure\" action in your Buddy pipeline

POST Parameters

NameTypeDescription
name
Required
StringThe name of the action.
type
Required
StringThe type of the action. Should be set to AZURE.
push_url
Required
StringThe url to the repository.
git_auth_mode
Required
StringThe authentication mode for Git Push. Should always be set to HTTP.
loginStringThe username required to connect to the server.
passwordStringThe password required to connect to the server.
use_custom_gitignoreBooleanWhen set to false the push will ignore paths listed in .gitignore file.
isolatedBooleanWhen set to true, action will push only repository files (without artifacts).
target_branchStringDefines the remote branch to which the push will be performed. If empty, files will be pushed to the same branch.
deployment_excludesString[]The paths and/or files that will be left out during the push. Only works when use_custom_gitignore is set to true.
deployment_includesString[]The exceptions from the ignore patterns set in deployment_excludes.
without_forceBooleanDefines whether the --force flag should be used when invoking the git push command or not.

Example

Request

POST https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions

JSON

{
"name": "Push to Your Repo",
"type": "AZURE",
"git_auth_mode": "HTTP",
"trigger_time": "ON_EVERY_EXECUTION",
"push_url": "https://buddytestapp.scm.azurewebsites.net:443/BuddyTestApp.git",
"login": "api_tests_user",
"password": "api_tests_password",
"isolated": true,
"target_branch": "stage",
"deployment_excludes": [
"/tmp/",
"*.log"
],
"deployment_includes": [
"/assets/style",
"/tmp/file.txt"
],
}

Sample Response

HTTP

Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

JSON

{
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/851",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/851/edit",
"id": 851,
"name": "Push to Your Repo",
"type": "AZURE",
"git_auth_mode": "HTTP",
"trigger_time": "ON_EVERY_EXECUTION",
"last_execution_status": "INITIAL",
"deployment_excludes": [
"/tmp/",
"*.log"
],
"deployment_includes": [
"/assets/style",
"/tmp/file.txt"
],
"login": "api_tests_user",
"push_url": "https://buddytestapp.scm.azurewebsites.net:443/BuddyTestApp.git",
"push_tags": true,
"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": "Live mirror",
"on": "CLICK",
"refs": [
"refs/heads/master"
],
"last_execution_status": "SUCCESSFUL",
"last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08"
}
}