Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f29d4e78b | ||
|
|
9d2dda0d77 | ||
|
|
b130bc0321 | ||
|
|
28be0300b9 | ||
|
|
3c2163ab78 | ||
|
|
fdf7e6927a |
@@ -1,4 +1,4 @@
|
|||||||
FROM ruby:3.3-alpine
|
FROM ruby:3.4-alpine
|
||||||
|
|
||||||
# Install docker/buildx-bin
|
# Install docker/buildx-bin
|
||||||
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
||||||
@@ -13,7 +13,7 @@ COPY Gemfile Gemfile.lock kamal.gemspec ./
|
|||||||
COPY lib/kamal/version.rb /kamal/lib/kamal/version.rb
|
COPY lib/kamal/version.rb /kamal/lib/kamal/version.rb
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apk add --no-cache build-base git docker openrc openssh-client-default \
|
RUN apk add --no-cache build-base git docker openrc openssh-client-default yaml-dev \
|
||||||
&& rc-update add docker boot \
|
&& rc-update add docker boot \
|
||||||
&& gem install bundler --version=2.4.3 \
|
&& gem install bundler --version=2.4.3 \
|
||||||
&& bundle install
|
&& bundle install
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
kamal (2.5.0)
|
kamal (2.5.2)
|
||||||
activesupport (>= 7.0)
|
activesupport (>= 7.0)
|
||||||
base64 (~> 0.2)
|
base64 (~> 0.2)
|
||||||
bcrypt_pbkdf (~> 1.0)
|
bcrypt_pbkdf (~> 1.0)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ class Kamal::Cli::Registry < Kamal::Cli::Base
|
|||||||
option :skip_local, aliases: "-L", type: :boolean, default: false, desc: "Skip local login"
|
option :skip_local, aliases: "-L", type: :boolean, default: false, desc: "Skip local login"
|
||||||
option :skip_remote, aliases: "-R", type: :boolean, default: false, desc: "Skip remote login"
|
option :skip_remote, aliases: "-R", type: :boolean, default: false, desc: "Skip remote login"
|
||||||
def login
|
def login
|
||||||
ensure_docker_installed
|
ensure_docker_installed unless options[:skip_local]
|
||||||
|
|
||||||
run_locally { execute *KAMAL.registry.login } unless options[:skip_local]
|
run_locally { execute *KAMAL.registry.login } unless options[:skip_local]
|
||||||
on(KAMAL.hosts) { execute *KAMAL.registry.login } unless options[:skip_remote]
|
on(KAMAL.hosts) { execute *KAMAL.registry.login } unless options[:skip_remote]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Kamal
|
module Kamal
|
||||||
VERSION = "2.5.0"
|
VERSION = "2.5.2"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -52,6 +52,18 @@ class CliRegistryTest < CliTestCase
|
|||||||
assert_raises(Kamal::Cli::DependencyError) { run_command("login") }
|
assert_raises(Kamal::Cli::DependencyError) { run_command("login") }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "allow remote login with no docker" do
|
||||||
|
stub_setup
|
||||||
|
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||||
|
.with(:docker, "--version", "&&", :docker, :buildx, "version")
|
||||||
|
.raises(SSHKit::Command::Failed.new("command not found"))
|
||||||
|
|
||||||
|
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
|
||||||
|
.with { |*args| args[0..1] == [ :docker, :login ] }
|
||||||
|
|
||||||
|
assert_nothing_raised { run_command("login", "--skip-local") }
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
def run_command(*command)
|
def run_command(*command)
|
||||||
|
|||||||
Reference in New Issue
Block a user