Git Push (password)

  • POST
  • /workspaces
  • /:domain
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /actions

Request

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
namerequired string
The name of the action.
typerequired string
The type of the action. Should be set to PUSH.
push_urlrequired string
The URL to the repository.
git_auth_moderequired string
The authentication mode for GIT. Should be set to HTTP.
tagstring
The name of the tag to push.
loginstring
The username required to connect to the server.
passwordstring
The password required to connect to the server.
push_tagsboolean
Defines whether the tags should be pushed to the remote repository or not.
use_custom_gitignoreboolean
When set to false the push will ignore paths listed in .gitignore file.
isolatedboolean
When set to true, action will push only repository files (without artifacts).
target_branchstring
Defines 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.
without_forceboolean
Defines whether the --force flag should be used when invoking the git push command or not.
commentstring
Optional custom git commit message.
custom_optionsstring
Use custom git push options.

Last modified on Oct 7, 2024

Example:

curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Push to https://app.buddy.works/buddy/repo",
  "login": "api_tests_user",
  "password": "api_tests_password",
  "type": "PUSH",
  "trigger_time": "ON_EVERY_EXECUTION",
  "push_url": "https://app.buddy.works/buddy/repo",
  "target_branch": "$BUDDY_EXECUTION_BRANCH",
  "tag": "tagName",
  "deployment_excludes": [
    "/tmp/"
  ],
  "git_auth_mode": "HTTP",
  "comment": "$BUDDY_EXECUTION_ID",
  "push_tags": false,
  "use_custom_gitignore": true,
  "custom_options": "--no-verify",
  "without_force": false
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/2", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/2/edit", "id": 2, "name": "Push to https://app.buddy.works/buddy/repo", "type": "PUSH", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "login": "api_tests_user", "password": "api_tests_password", "push_tags": false, "git_auth_mode": "HTTP", "target_branch": "$BUDDY_EXECUTION_BRANCH", "push_url": "https://app.buddy.works/buddy/repo", "comment": "$BUDDY_EXECUTION_ID", "tag": "tagName", "deployment_excludes": [ "/tmp/" ], "without_force": false, "custom_options": "--no-verify", "use_custom_gitignore": 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" } }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999