dash 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dash/cli/build.rb +4 -1
- data/lib/dash/configuration/docs/builder.yml +6 -0
- data/lib/dash/configuration/docs/ssh.yml +4 -0
- data/lib/dash/sshkit_with_ext.rb +6 -1
- data/lib/dash/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc1b627f67a26c559766675b05520f13b49bc632ae72b00abfee08d806492e3a
|
|
4
|
+
data.tar.gz: '0868bc43a71299d4f4567d0b322ced4b2454cc640502b9cd8e7a01e923a2a75a'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87f99fe550d1256059f29f0fdfba3540b1f24d3d94d2761003b517b48cb8659b5196206e959408a4f6cd5514b1a74de3b4f7888e1d545b9c1035218123336469
|
|
7
|
+
data.tar.gz: 1b3fd06c1844f66b87af0dec4cf1661b6422d8b3da8e9f952d749d8a3dcd289675860e4cb326e4a26c04687a7a64daaf42c8e17d712f7a9dbd667ed40692baf6
|
data/lib/dash/cli/build.rb
CHANGED
|
@@ -237,9 +237,12 @@ class Dash::Cli::Build < Dash::Cli::Base
|
|
|
237
237
|
def connect_to_remote_host(remote_host)
|
|
238
238
|
remote_uri = URI.parse(remote_host)
|
|
239
239
|
if remote_uri.scheme == "ssh"
|
|
240
|
+
# `ssh.proxy` is how dash reaches the hosts it deploys to, not the builder. Like the
|
|
241
|
+
# docker context buildx uses for it, the builder connection takes its jump host (if
|
|
242
|
+
# any) from ~/.ssh/config, so `proxy: nil` stops the global one from being merged in.
|
|
240
243
|
host = SSHKit::Host.new(
|
|
241
244
|
hostname: remote_uri.host,
|
|
242
|
-
ssh_options: { user: remote_uri.user, port: remote_uri.port }.compact
|
|
245
|
+
ssh_options: { user: remote_uri.user, port: remote_uri.port }.compact.merge(proxy: nil)
|
|
243
246
|
)
|
|
244
247
|
on(host, options) do
|
|
245
248
|
execute "true"
|
|
@@ -21,6 +21,12 @@ builder:
|
|
|
21
21
|
#
|
|
22
22
|
# The connection string for a remote builder. If supplied, dash will use this
|
|
23
23
|
# for builds that do not match the local architecture of the deployment host.
|
|
24
|
+
#
|
|
25
|
+
# The connection to the builder does not go through `ssh.proxy` or
|
|
26
|
+
# `ssh.proxy_command`, which are for the hosts dash deploys to. A builder that
|
|
27
|
+
# must itself be reached through a jump host says so in `~/.ssh/config`
|
|
28
|
+
# (`ProxyJump`). The docker SSH context that buildx uses for the builder reads
|
|
29
|
+
# that file too.
|
|
24
30
|
remote: ssh://docker@docker-builder
|
|
25
31
|
|
|
26
32
|
# Local
|
|
@@ -29,11 +29,15 @@ ssh:
|
|
|
29
29
|
|
|
30
30
|
# Proxy host
|
|
31
31
|
#
|
|
32
|
+
# Used for the hosts dash deploys to, not for a remote builder (`builder.remote`).
|
|
33
|
+
#
|
|
32
34
|
# Specified in the form <host> or <user>@<host>:
|
|
33
35
|
proxy: root@proxy-host
|
|
34
36
|
|
|
35
37
|
# Proxy command
|
|
36
38
|
#
|
|
39
|
+
# Like `proxy`, not used for a remote builder.
|
|
40
|
+
#
|
|
37
41
|
# A custom proxy command, required for older versions of SSH:
|
|
38
42
|
proxy_command: "ssh -W %h:%p user@proxy"
|
|
39
43
|
|
data/lib/dash/sshkit_with_ext.rb
CHANGED
|
@@ -183,13 +183,18 @@ class SSHKit::Backend::Netssh
|
|
|
183
183
|
|
|
184
184
|
module LimitConcurrentStartsInstance
|
|
185
185
|
private
|
|
186
|
+
# A host can opt out of a global option by setting it to nil (the remote builder sets
|
|
187
|
+
# `proxy: nil` so it doesn't inherit `ssh.proxy`). The nil stays on the host so every
|
|
188
|
+
# later merge still overrides the global, but it never reaches Net::SSH.start: net-ssh
|
|
189
|
+
# merges explicit options over ~/.ssh/config, so a nil would also discard what the
|
|
190
|
+
# operator configured for that host there (and net-ssh warns about nil options).
|
|
186
191
|
def with_ssh(&block)
|
|
187
192
|
host.ssh_options = self.class.config.ssh_options.merge(host.ssh_options || {})
|
|
188
193
|
self.class.pool.with(
|
|
189
194
|
method(:connect_ssh),
|
|
190
195
|
String(host.hostname),
|
|
191
196
|
host.username,
|
|
192
|
-
host.netssh_options,
|
|
197
|
+
host.netssh_options.compact,
|
|
193
198
|
&block
|
|
194
199
|
)
|
|
195
200
|
end
|
data/lib/dash/version.rb
CHANGED