Commit Graph

69 Commits

Author SHA1 Message Date
Bo-Yi Wu
49542638c6
refactor: set default environment variables format in plugin (#253)
- Add `INPUT_ENVS_FORMAT` to the list of environment variables in `main.go`
- Define `envsFormat` variable in `plugin.go`
- Add default value for `Config.EnvsFormat` in `plugin.go` `Exec()` function

fix https://github.com/appleboy/drone-ssh/pull/235
2023-04-13 09:32:31 +08:00
Vladimir Sigalkin
6464d9999f
chore: flexible configuration of environment value transfer (#235)
**Reason:**
I have to use drone-ssh to work with Windows SSH. Initially, drone-ssh is written so that it transmits environment variables through the `export` command. Which makes it unsuitable for working with Power Shell.

**Solution:**
I have added a new option to configure environment variable commands formatting, with default value: `export {NAME}={VALUE}`. When I use drone-ssh with PowerShell I set this option like this: `$env:{NAME} = {VALUE}`.
2023-04-13 09:13:07 +08:00
Bo-Yi Wu
b9cfca60e9
refactor: standardize environment variables naming conventions (#252)
- Modify the `EnvVars` slice to include `INPUT_` prefix when needed
- Remove unused environment variables from the `EnvVars` slice
- Update the `EnvVars` slice to include `PROXY_` prefix when needed
- Modify the `EnvVars` slice to include `PLUGIN_SSH_CIPHERS` as `PROXY_SSH_CIPHERS`
- Modify the `EnvVars` slice to include `PLUGIN_PROXY_USE_INSECURE_CIPHER` as `PROXY_SSH_USE_INSECURE_CIPHER`
- Modify the `EnvVars` slice to include `PLUGIN_PROXY_FINGERPRINT` as `PROXY_SSH_FINGERPRINT`
- Remove the environment variable `PROXY_HOST`
- Modify the `EnvVars` slice to include `PLUGIN_DEBUG` as `INPUT_DEBUG`

* https://github.com/appleboy/ssh-action/issues/53#issuecomment-1184700432
* https://github.com/appleboy/ssh-action/issues/32#issuecomment-1184700363
* https://github.com/appleboy/ssh-action/issues/213
2023-04-13 09:08:12 +08:00
Albert Wang
541508632d
chore: remove dotenv autoloading (#243) 2023-03-27 21:56:04 +08:00
Bo-Yi Wu
c8ecc03ef5
Revert "chore(scripts): disable SliceFlagSeparator" (#215) 2022-12-27 08:25:11 +08:00
Bo-Yi Wu
ddf9ca3e6f
chore(scripts): disable SliceFlagSeparator (#212) 2022-12-25 15:48:42 +08:00
Bo-Yi Wu
a568d2e551
chore(cli): upgrade urfave/cli to v2 (#211) 2022-12-25 15:44:30 +08:00
Bo-Yi Wu
d17a10dd0c
Revert "chore(cli): upgrade urfave/cli to v2" (#210) 2022-12-25 15:15:55 +08:00
Bo-Yi Wu
d83798f25b
chore(cli): upgrade urfave/cli to v2 (#152) 2022-12-25 14:56:47 +08:00
Bo-Yi Wu
471976f1d8 chore(go): upgrade to go1.17
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-02-06 13:02:24 +08:00
Bo-Yi Wu
1d89d2d875 chore: load env from /run/drone/env path 2020-07-17 23:23:31 +08:00
Bo-Yi Wu
b447da961e chore: remove auto load .env file
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-06-15 16:37:09 +08:00
Bo-Yi Wu
7344ac6529
chore: support UseInsecureCipher (#158) 2020-05-24 10:43:11 +08:00
Bo-Yi Wu
1288a4b20d docs: update fingerprint comment.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-19 14:11:26 +08:00
Bo-Yi Wu
a2c6be3c19
support Fingerprint (#157) 2020-05-19 14:01:28 +08:00
Bo-Yi Wu
ec9d02ec38 missing Ciphers config
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-30 15:49:00 +08:00
Bo-Yi Wu
9c9e7914ce support custom Ciphers value
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-30 15:38:46 +08:00
techknowlogick
9e205a756f
Add option to use file for host info (#156) 2020-04-29 14:21:31 +08:00
Bo-Yi Wu
a046be092b docs: add passphrase example
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-12-31 09:46:38 +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
8d0b62974a chore: update default timeout to 10 minutes 2019-11-30 22:40:13 +08:00
Bo-Yi Wu
9ef0a47bc0 chore: add single command for github actions. 2019-11-21 00:44:00 +08:00
Bo-Yi Wu
79584d6cfa docs: update envs usage, 2019-09-29 11:21:15 +08:00
Bo-Yi Wu
cacb93d984 chore: support github actions input variable. 2019-09-29 10:26:21 +08:00
Bo-Yi Wu
44cc1f409f remove path variable
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-05-16 10:04:25 +08:00
Bo-Yi Wu
27b9f04a04 remove secrets flag
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-05-15 06:45:04 +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
e79f8934dc chore: remove build number 2019-03-10 23:44:59 +08:00
Bo-Yi Wu
2fd7649e83 fix: trigger build fail if error 2019-03-10 23:40:29 +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
7ac526845d
Revert "feat: upgrade easyssh-proxy and update flag of timeout field (#127)" (#128)
This reverts commit eb33537e3f.
2018-10-23 15:54:40 +08:00
Bo-Yi Wu
eb33537e3f
feat: upgrade easyssh-proxy and update flag of timeout field (#127) 2018-10-23 15:14:48 +08:00
Marco Vito Moscaritolo
3499506089 exit after first error (#123)
Closes #121 

WIP
2018-09-26 15:23:31 +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
f92f762c9d Load PLUGIN_ENV_FILE before app is run (#112) 2018-02-24 19:47:07 +08:00
Damian Kaczmarek
4d443c40f2 fix: ssh process error not resulting in pipeline error (#105)
* fix: ssh process error not resulting in pipeline error

* Update main.go
2017-11-09 20:47:15 -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
6f1ace35bf add build number for drone.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-09-04 17:22:52 +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
05b1a61165 refactor: upgrade easyssh to support DefaultConfig (#61) 2017-04-01 13:57:53 +08:00
Bo-Yi Wu
6921b0b786 fix: command line variable. (#58) 2017-03-04 23:13:55 +08:00
Bo-Yi Wu
e5dc646e5d fix: redefined: user (#56) 2017-03-04 21:26:18 +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
28ffc3a790 release v1.1.0
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-04 17:37:25 +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
da4a550afd feat: add command line flag. 2017-01-24 15:31:06 +08:00