Rsync
- POST
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
Creates a new Rsync action in the pipeline
Request example
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Sync files",
"disabled": true,
"type": "RSYNC",
"trigger_time": "ON_EVERY_EXECUTION",
"local_path": "/source_path",
"remote_path": "/target_path",
"deployment_excludes": [
"/assets/",
"/myDir"
],
"deployment_includes": [
"/assets/dir",
"/myDir/dir1"
],
"archive": false,
"compress": false,
"recursive": true,
"dirs": true,
"delete_extra_files": true,
"targets": [
{
"identifier": "my_target_id",
"name": "my-target",
"type": "SSH",
"scope": "ACTION",
"path": "target/path/on/server",
"host": "my-server.tests",
"port": "1234",
"auth": {
"username": "my-user",
"password": "my-password",
"method": "PASSWORD"
},
"tags": [
"olive",
"orange",
"rabsperry"
]
}
],
"variables": [
{
"key": "env_key",
"value": "env_value",
"type": "VAR",
"settable": false,
"run_only_settable": false,
"encrypted": false,
"description": "nnnmstgikb"
}
],
"timeout": 1800,
"retry_interval": 60,
"retry_count": 5,
"ignore_errors": true,
"arguments": "--times --links",
"current_revision": "21825f31ddce8a89b3ed9f4c92f038b339cde150",
"loop": [
"env_key"
]
}'STATUS200 OK