Commit Graph

45 Commits

Author SHA1 Message Date
Bo-Yi Wu 32510c86bf
feat: implement and test all environment variables functionality (#264)
- Add a new flag `allenvs` to pass all environment variables to the shell script
- Implement the `AllEnvs` functionality in the `exec` function
- Add a new function `findEnvs` to find all environment variables with specified prefixes
- Add tests for the `findEnvs` function and the `AllEnvs` functionality
2023-07-23 09:41:09 +08:00
Yoan Tournade 905bb4cb1a
chore: allows to specify IP protocol (#261)
* Allows to specify IP protocol, including IPv4 only

* Add tests forcing IPv4 or IPv6
2023-06-23 16:45:44 +08:00
Bo-Yi Wu a8d30dc133
feat: refactor code for parallel execution on multiple hosts (#249)
- Add `trimValues` function for cleaning up slice values
- Remove unused `wg.Done()` call
- Modify `Exec` function to launch goroutines for each host in `Config.Host`
- Add test for `ScriptStop` with multiple hosts and sync mode

refer to: https://github.com/appleboy/ssh-action/issues/233
2023-04-04 16:56:50 +08:00
Bo-Yi Wu 1a95b5f1b3
chore(auth): allow use password and key at same time (#240) 2023-02-28 17:04:39 +08:00
Prashant Shahi cc7a2d5983
fix(envs): 🐛 set environment variable instead of bash variable (#219) 2023-01-08 08:36:33 +08:00
Bo-Yi Wu 5525ed602f fix(lint): io/ioutil is deprecated 2022-12-07 13:47:02 +08:00
Bo-Yi Wu 6850ed1bff chore(makefile): change gofmt toll to gofumpt 2021-01-12 00:54:00 +08:00
Bo-Yi Wu e059b33708
chore: support multiple port (#168)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-11-17 10:14:11 +08:00
Bo-Yi Wu 66bbf9b7cd
chore: support Multiline SSH commands interpreted as single lines (#160)
https://github.com/appleboy/ssh-action/issues/75
2020-08-08 15:31:57 +08:00
Bo-Yi Wu 7344ac6529
chore: support UseInsecureCipher (#158) 2020-05-24 10:43:11 +08:00
Bo-Yi Wu a2c6be3c19
support Fingerprint (#157) 2020-05-19 14:01:28 +08:00
Bo-Yi Wu 6b488f1203
support ssh Passphrase (#149)
* support ssh Passphrase

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-12-30 16:16:37 +08:00
Bo-Yi Wu 9b57f85e47 chore(cmd): trim space in command
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-11-21 09:13:04 +08:00
Bo-Yi Wu 648e3c1321
chore: support split from string text (#148) 2019-11-21 09:05:32 +08:00
Bo-Yi Wu f6128860ab chore: Add short variable 2019-05-14 22:15:29 +08:00
Bo-Yi Wu 56b67e1314
chore: change command timeout flag (#138)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-11 14:36:17 +08:00
Bo-Yi Wu 89fce5b1d3 chore(variable): change UserName to Username
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-06 11:00:09 +08:00
Bo-Yi Wu 3342cdf59a refactor: error var missingXXX should have name of the form errFoo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-04 14:47:28 +08:00
Bo-Yi Wu aa95c51e7f refactor(error): update error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-04 14:42:28 +08:00
Bo-Yi Wu 6e431b0c53
test: add TestCommandScriptStop (#124) 2018-09-26 15:35:57 +08:00
Josh Komoroske 6c0b475c15 Customization of logger output destination (#117)
* Customization of logger output destination

* Tests to verify output correctness
2018-02-28 14:52:15 +08:00
Josh Komoroske 60993a71e2 Preservation of forwarded environment (#113)
* Tests for omitting unset variables

* Preservation of forwarded environment
2018-02-28 13:44:44 +08:00
Bo-Yi Wu 8bfc58f9d0
test: Add escapeArg testing (#116) 2018-02-27 14:58:43 +08:00
Damian Kaczmarek 7f4cb1c1d0 improve: shell escaping, allow for whitespace and single quotes (#108) 2018-02-27 14:48:38 +08:00
Damian Kaczmarek 45f43d7ffd fix: escaping special characters when passing env to ssh (#104) 2017-11-09 19:01:28 -06:00
Bo-Yi Wu 7220c94832
Add sync mode. (#101)
* Add sync mode.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* close channel in sync mode.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* close channel in sync mode.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-29 21:31:51 -05:00
Bo-Yi Wu 40323f23e5 update testing
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-01 17:24:38 +08:00
Bo-Yi Wu ed83305de8 add debug mode. (#92)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-01 16:54:34 +08:00
Bo-Yi Wu ecfaecd46d feat(env): pass secret to remote server. (#91)
* feat(env): pass secret to remote server.

* add testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-01 12:01:37 +08:00
Bo-Yi Wu 26b3d47ee2
add exit code example.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-13 13:47:00 +08:00
Bo-Yi Wu 0a78278313
add return error code command example.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-12 14:21:33 +08:00
Bo-Yi Wu 2d568d1fde Support stream output logs. (#79)
* Support stream output logs.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix block channel.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-10 11:34:00 +08:00
Bo-Yi Wu b6c973ef1e fix: get exit code from ssh run command. (#78) 2017-05-09 09:38:31 +08:00
Bo-Yi Wu b63f275e9e refactor: show errors if set password and key at the same time (#72) 2017-04-23 11:49:40 +08:00
Bo-Yi Wu 05b1a61165 refactor: upgrade easyssh to support DefaultConfig (#61) 2017-04-01 13:57:53 +08:00
Bo-Yi Wu b6ec7c2347 fix: remove check error string. (#57) 2017-03-04 22:01:48 +08:00
Bo-Yi Wu 530df8d98b feat: Support proxy command. (#55) 2017-03-04 18:31:49 +08:00
Bo-Yi Wu 7e4e0224ee feat: Add time out flag. (#53)
* feat: Add time out flag.

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-04 17:50:05 +08:00
Bo-Yi Wu 833d26f473 feat: support username flag. (#45)
* feat: support username flag.
2017-02-21 11:44:37 +08:00
Bo-Yi Wu 6e733c0a03 feat: add easyssh and go routine. (#38) 2017-01-29 12:57:00 +08:00
Bo-Yi Wu 95f777f22e test: improve testing. 2017-01-24 15:06:46 +08:00
Bo-Yi Wu 876c4c1cee feat: Support import private key from file path. (#34) 2017-01-24 11:28:48 +08:00
Bo-Yi Wu 79530c6026 feat: add some testing. (#32) 2017-01-23 16:00:48 +08:00
Bo-Yi Wu c46dd8eadf feat: check missing host or user. 2017-01-23 14:24:27 +08:00
Bo-Yi Wu 3932e1a754 feat: add testing and makefile. 2017-01-23 09:50:25 +08:00