drone-ssh
drone-ssh copied to clipboard
Timeout for retrying initial ssh connection
Codecov Report
Merging #118 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #118 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 107 129 +22
=====================================
+ Hits 107 129 +22
Impacted Files | Coverage Δ | |
---|---|---|
plugin.go | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6c0b475...b40bfc5. Read the comment docs.
The motivation behind this feature is that in our Drone build we dynamically provision a VM, then run commands on it for testing (see my comments here).
This VM is quickly "up" from a cloud infrastructure perspective, but it is often the case where SSHD needs an additional ~30 seconds to be functional. This PR adds an additional PLUGIN_RETRY_TIMEOUT
value that allows a developer to specify how long to attempt to connect to the host for, retrying whenever a network error is encountered, with exponential backoff.
Basically prevents your entire build from turning red, just because your SSH daemon took a few seconds too long to start 😄
Cheers!
@appleboy do you have any thoughts on this PR? I would be happy to hear any feedback you have 😄
I will take this.