YAML parameters
Name | Type | Description |
---|
action Required | String | The ID of the action. |
type Required | String | The type of the action. Should be set to SSH_COMMAND . |
targets Required | String | Defines a target (server) for your deployments using the following parameters. |
working_directory | String | The absolute or relative path on the remote server. |
ignore_errors | Boolean | If set to 'true' the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions. |
run_as_script | Boolean | If set to true , commands are executed as a regular script. If set to false, the commands will be executed one by one, in non-interactive mode. |
shell | String | The name of the shell that will be used to execute commands. Can be one of SH (default) or BASH . |
execute_every_command | Boolean | If set to true all commands will be executed regardless of the result of the previous command. |
Parameters for targets
Name | Type | Description |
---|
type Required | String | The type of the target. Possible values: SSH , MATCH , UPCLOUD , VULTR , DIGITAL_OCEAN |
id Required | String | Target identifier |
host Required | String | The host for the connection |
path Required | String | Path on the server defined in the target. |
auth Required | Auth | Authentication details using the following parameters. |
port | String | Port for the connection |
proxy | String | Define a SSH proxy server using the following parameters (available only for SSH targets). |
Parameters for auth in targets
Name | Type | Description |
---|
method Required | String | Required for SSH, UPCLOUD, VULTR and DIGITALOCEAN. Defines authentication method, available values: PASSWORD , SSH_KEY , ASSETS_KEY , PROXY_CREDENTIALS , `PROXYKEY` |
password Required | String | The password required to connect to the server. |
asset Required | String | Name of the variable containing the private key. Required for ASSETS_KEY method. |
username Required | String | The username required to connect to the server. |
key | String | Proxy key used for authentication. For proxy targets only. |
passphrase | String | Passphrase for the SSH key. |
keyPath | String | Path in which the proxy key is located. For proxy targets only. |
Parameters for proxy
Name | Type | Description |
---|
host | String | Host for the proxy connection. |
port | String | The port for the proxy connection. |
auth | Auth | Define proxy servers' authentication method using the following parameters. |
Examples
SSH command (Password)
actions:
- action: Execute date >> tmp.log
type: SSH_COMMAND
working_directory: /
commands:
- date >> tmp.log
targets:
- type: SSH
id: test_ssh
host: 192.0.2.1
path: Home/www
auth:
username: api_tests_user
password: secure!pROxsWLtSGCxEdUFy2Y6KW5lpPLQG+faZmHSKAjnnNQ=.GUbAjUkzTk0WEIBUnLVN8g==
ignore_errors: true
run_as_script: true
SSH command (Key & Password)
actions:
- action: Execute date >> tmp.log
type: SSH_COMMAND
working_directory: /
commands:
- date >> tmp.log
targets:
- type: SSH
id: t_12_34_56_78
host: 12.34.56.78
path: Home/www
auth:
method: ASSETS_KEY
username: $api_tests_user
password: secure!GJKAr4c7qQjrypPmC7vapg==.wZIc/S6v9kmi7S1JVOX4tg==
asset: id_project
passphrase: secure!BodarDz0YQsb6OLwDXl8pA==.2CoOf7LKRBfq5JhF1rc2OQ==
ignore_errors: true
run_as_script: true
shell: SH
variables:
- key: api_tests_password
value: secure!PqxPSwfZ/Aj2TzES7xWjk+RAOVKBDzPjEFXlTPhHlJE=.wtUbjOBRa5VJaTFPa80BvQ==
type: VAR
encrypted: true
SSH command (Private Key & Password)
actions:
- action: Execute date >> tmp.log5
type: SSH_COMMAND
working_directory: /
commands:
- date >> tmp.log
targets:
- type: SSH
id: localhost
host: localhost
path: Home/www
auth:
method: SSH_KEY
username: $api_tests_user
password: secure!pROxsWLtSGCxEdUFy2Y6KW5lpPLQG+faZmHSKAjnnNQ=.GUbAjUkzTk0WEIBUnLVN8g==
passphrase: secure!6Hp0qXVeQ6CRto2VNU7aV++Z/9XRtwVxivmdUn+Gjko=.fj+NceK6nRK0ounEcMq5/w==
key: secure!ZUVljD66bL/amlW/HiQ/F/05o1gVrS2bYwdrwXku9TlHh5a6qO580xaW3bZUF59muyIvxpnDWkG39Cs6+UTTo0NhsPSFwd21w1GBJb4R0ajPSTYXURi7EPnMxHO+TOuQ08rpWvmbUgQN2WWnUAEEIgMPdNS8IjHq5l8eqCxuXx0JkpkmyPghxs3evYQ2A1q1ftllliEpAahJ41iSWriQfQwnq6c0QKOmA5GFSQcg/i0kDBhy/g5rMGERF2MAu1oOKiJhM9Jp3njRQJViyiiHqlBkDfeZvb+8DgF7Ua3Kc1TvzUVssepWvhW7vFdkKRkGkyLBhhCzr0ULYhwrMbD3xIkB5sPphIa8YG8wNj4nUy0xiwfIWR876LD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1gP93uNqwEaVEbIgIwSaCazl+6Z83oR8ml3EPM3/GbPAD7C7UurzowFIh5YxUVcOWy0zngx2EkrY/tSCQPNxddDcjB7HFviDyxOxJI/YCRA2UXfjJHyS8tBSgcy684YwRLtiieLSC6gEKJY67UKrKIg4I+dNRVscktwh79UQeWU9fc0+l0w4Kar9kTpWbNPsAbqnqq2vdRCtodNgJfoir1ITdeDpsTEfO//G/5nrJ0JTgFJVGTtO4gQyjsTPadY5K2VyUY6mVlumZ4DtbXucb2lcWmTGahnpHe6x951DPRW3mEGaOLLRmPOneiTDnb2nyDHZU9Zv95VIdWOsbhd1XduRhJqHZlKkPmUISQd/0/TKjEIxHWqCMH5xE2tZnUs77gTiG7CCr39xBLtf0dC+TCtrulFHxQT4FKoa06bOITy3Q1qvlbMMm0Eh9S26B2CpwbxFQDlic4Pg3zDZyHmxlzg7Z1aTwrmxhFWnj5AshAyqedQepiwxDtmeBqQ9Vkcffx2SEaH9N91CBTyaj3TF+3Cb9oUJbFp3xJ80Tm+OdGy7kzLZOlmZY5TPKExANQ9A7CG9nT6iXGnTA5UGyKq6wGd8qGgdnci3aGPLCk7t5Ak0hRNm5kJrwM0uhvp9TyEqIbeVvUyk6gcUegWIzsxDxQ2/VBErQqc0RqJxTC2Cle84blxH1PrQxBZXMz72MHejIW79GzJAvTkBgAIN2JM2wixgLxOL+QD6PIqXa1Zd9zbdgANp5Q571Ez7/TBBJB+UkJklTk+kJAVTHWgK8qop3mlP5spJX5owrWUyAFHeM2cSrCcLvqC1clKXY4jS6U2/Az9e7BD2wO2Tb26Tb2se/WiQgG+gxI0Zg+Q92vxQlPmXvAqlpIJ3cm/YFCCJTxCJMWXFIOf3.GN8ns1vivuqUGklMyacAug==
ignore_errors: true
run_as_script: true
shell: SH
variables:
- key: api_tests_password
value: secure!PqxPSwfZ/Aj2TzES7xWjk+RAOVKBDzPjEFXlTPhHlJE=.wtUbjOBRa5VJaTFPa80BvQ==
type: VAR
encrypted: true
- key: api_tests_user
value: userLogin123
type: VAR
SSH target with integration
actions:
- action: Transfer files to DigitalOcean
type: SSH_COMMAND
commands:
- date >> tmp.log
targets:
- type: DIGITAL_OCEAN
id: do_server
host: buddy-tests
port: 6464
path: Home/www
auth:
username: api_tests_user
password: secure!uchZuIWmlFo8df6U1x2p6e3kBdA7ozI3g4I3AmWwl5cRxdqO/lNuZKWF8EF5canJkH0H0CaEaxTjtofe29Zxig==.ugTqbpIDsFqX+EirkR5RZQ==
integration: digitalocean
run_as_script: true
Proxy
actions:
- action: Upload files to localhost with proxy
type: SSH_COMMAND
working_directory: /
commands:
- date >> tmp.log
targets:
- type: SSH
id: sftp
host: 192.0.2.1
path: Home/proxy/
auth:
username: api_tests_user
password: secure!du27Zc5MW1DRv7NfilTtAQ==.0GzkmyRlOlCTPk6MY1veWQ==
proxy:
host: proxy.myserver.com
port: 80
auth:
username: api_tests_user_proxy
password: secure!vq+DMivrKXUUaLwPU4GrgA==.4jnsl8kzHILdYwJPY2T5rg==
Proxy Password
proxy:
host: 192.0.2.1
port: 4444
auth:
username: api_tests_user_proxy
password: secure!CZ50ORZTDvDgpRUVQZ6utuyxLVSOMLDw0U/S8YQ4RoE=.Sv3oqDJbq0HZKwZKqsuoIg==
Proxy Private Key
proxy:
host: 192.0.2.1
port: 4444
auth:
method: SSH_KEY
username: api_tests_user_proxy
password: secure!BodarDz0YQsb6OLwDXl8pA==.2CoOf7LKRBfq5JhF1rc2OQ==
asset: ""
passphrase: secure!BodarDz0YQsb6OLwDXl8pA==.2CoOf7LKRBfq5JhF1rc2OQ==
key: secure!DLYFytd8H9/GhHn7S9hyBv0Yz8TTExoi9gxOOegndHYszrnc1h29XMZtYPolmItjWI5zGL9JYiV26ZvYc5IGC2PC+S+2M3l7/cwUCbiR2PPP59dmgbQKEnBUc/R2jTy6/itzqPP2C51J8aqccn9kCQs9IUD1LP1L3wMRfXef3xoYlwRxeLfR4GmHtorbtE7j88F7Y7IiT175x8JII1dfdWtqEP9SITsnkOSdbtzzfKtW+jjpIyZMpt9qvoWoW/gtpcVdz4Pj/XK/CvVv6XCr+P3Pn3xkuBhDjR09zDzFORuNMpc+6M3JYmIKfXitQWyLSFoGSQJwhFOD2KjaTJaT6o3DGLbR1S6DA0lb0ZcEnOIdoAJAS2G+rsw9lDA0bVRvsttp6jHUojoES3/727b9BE1Vbb5VR7MqlowqhUfS68Ak62bEAt5j12AVSV0C2U46OKeej6aE2iIF5MN+Ydofayer9f4fUmMND6EqhHPEbUtsQ9Wfmvhb8SZh0SqbBfNBnKEvYRPGApO35lP7NGXY7fkVHmS5K9ljGALb5vFbkK9ByR6FvMGLIVjBJCNdYRXr6jXXG2+Q8JXFKGZKoMcHiBxeV/Tsf0HmGLj1WVIyvZtWW91ADbPSpDPDTGnvV8Ma+f6sV6kuCOpauSZwnlky/TtdSH3B+h90JtwZBYLKV8xUOpPaEl67w8H5JgYL+JYMRMs788WvgNqoPjemDBQucpLuACh+/gY6Ow6irKYJyg8tQrKKHcC8la1RJI4a/e6ozcPRNmtXkLbdTANUue0SIGUR9SJSEJNLLx5BarlTSbjFGxN2B7DQZktAQBoG6Cg5B5oDVk1235Ruv/M5FFt8d/fpauGZ8VjVfeKZLsWKZzYxqSjrH1I4fTxqX1/Eg4b6Z/Ai0O9ZD2QfuQBhF3i7Ia8Q810gAfCYR33xxKakhEXVDVS3vrke8+MFWL0LQGSJ1A1oggrOHlaL9IgvMO72gems0JuX8NkdRuNLILO1SzdTrOJJGGVpjVQEWK1MuJIa6AQQwaHEKXs2WxxOo/6TZr5SHyLQW3Y84GMcW8nNX2JaDYANVy6teUbRYTek9A9AWM3LFcONT+5HvpJPPDTzzgR3RaXrhrdS16bBIedOYMBNVAZIyZgLGNwahEnctqD0SnW7NFmi34QTrMdWfsSec1v1MCcEf88OyI6vbfrNCuU=.Ewjpcx11laWtqNxN2IpxPw==
Proxy (SSH Key & Password)
proxy:
host: 192.0.2.1
port: 4444
auth:
method: ASSETS_KEY
username: api_tests_user_proxy
password: secure!CZ50ORZTDvDgpRUVQZ6utuyxLVSOMLDw0U/S8YQ4RoE=.Sv3oqDJbq0HZKwZKqsuoIg==
asset: WorkshopDevsSSH
passphrase: secure!CFLWjeyweVkNWbUCj/VglQ==.XvmJy7hd4iePartPOM3I/w==
Proxy Environment Key
proxy:
host: 192.0.2.1
port: 4444
auth:
method: ASSETS_KEY
username: api_tests_user_proxy
password: secure!BodarDz0YQsb6OLwDXl8pA==.2CoOf7LKRBfq5JhF1rc2OQ==
asset: WorkshopDevsSSH
passphrase: secure!BodarDz0YQsb6OLwDXl8pA==.2CoOf7LKRBfq5JhF1rc2OQ==