vanagon 0.48.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ebf19c5c30050bbeebe73267d6ac1c47edfb0ffd171354783f74244eb8fe8d1
4
- data.tar.gz: b65ba3da648b80a20c43acc0034bb290442d596cf75e2f0e91225eb5e51f9452
3
+ metadata.gz: acf7f500aa426cdbb5bf356fb3070d4ed915a19f6e472dbda4fa55a17d983a27
4
+ data.tar.gz: 6592b0428d6c4f4dba72609dde1acfbc7bbc122982bee2ed5a03b164b7cd9b56
5
5
  SHA512:
6
- metadata.gz: 1dfb7a9a534a6ac350ddab573344c3c6c32e091650d143fa978e4a2d20b38ee719c856125b1ee551cc6513d4ee70e414d6f868f7f4cef88f0d559ae7f55bee8b
7
- data.tar.gz: bcf7b4ba89082727d98b7d1a591886cafd62f71d43597d00624c5ddfd3984358fe5dfda650d14c65bce22b33bae3c926e5fb87656cbb82c97a34835b8dda15d5
6
+ metadata.gz: 6e2351e65e897113a62deef2824875f56a02218811046b3e4cfae9d2580cadc9f788cc99f6dd5767951d8801dcca60cb6a30fd2e863531af9895819294d019c8
7
+ data.tar.gz: b6c0cd5d42c8c598ca383995f4c77ee01bcc9b6fcdea54d756c1ce6ae41a8337db8e917b425b5296100f3830934eabca1efb71e6f94d4e28763ea2dff25ff4a8
@@ -40,7 +40,7 @@ class Vanagon
40
40
  extra_args = @platform.docker_run_args.nil? ? [] : @platform.docker_run_args
41
41
 
42
42
  Vanagon::Utilities.ex("#{@docker_cmd} run -d --name #{build_host_name}-builder #{ssh_args} #{extra_args.join(' ')} #{@platform.docker_image}")
43
- @target = URI.new('localhost')
43
+ @target = URI.parse('localhost')
44
44
 
45
45
  wait_for_ssh unless @platform.use_docker_exec
46
46
  rescue StandardError => e
@@ -0,0 +1,10 @@
1
+ platform "amazon-7-aarch64" do |plat|
2
+ plat.servicedir "/usr/lib/systemd/system"
3
+ plat.defaultdir "/etc/sysconfig"
4
+ plat.servicetype "systemd"
5
+
6
+ packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake3 make rpm-libs rpm-build libarchive)
7
+ plat.provision_with("yum install -y --nogpgcheck #{packages.join(' ')}")
8
+ plat.install_build_dependencies_with "yum install --assumeyes"
9
+ plat.vmpooler_template "amazon-7-arm64"
10
+ end
@@ -101,4 +101,26 @@ describe Vanagon::Engine::Docker do
101
101
  end
102
102
  end
103
103
  end
104
+
105
+ describe '#select_target' do
106
+ context 'when platform has use_docker_exec set' do
107
+ subject { described_class.new(platform_with_docker_exec) }
108
+
109
+ it 'starts a new docker instance' do
110
+ expect(Vanagon::Utilities).to receive(:ex).with("/usr/bin/docker run -d --name debian_10-slim-builder debian:10-slim")
111
+
112
+ subject.select_target
113
+ end
114
+
115
+ it 'sets the target to a localhost URI' do
116
+ allow(Vanagon::Utilities).to receive(:ex)
117
+
118
+ subject.select_target
119
+
120
+ uri = subject.target
121
+ expect(uri).to be_an_instance_of(URI::Generic)
122
+ expect(uri.path).to eq('localhost')
123
+ end
124
+ end
125
+ end
104
126
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet By Perforce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-16 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -172,6 +172,7 @@ files:
172
172
  - lib/vanagon/platform/deb.rb
173
173
  - lib/vanagon/platform/defaults/amazon-2023-aarch64.rb
174
174
  - lib/vanagon/platform/defaults/amazon-2023-x86_64.rb
175
+ - lib/vanagon/platform/defaults/amazon-7-aarch64.rb
175
176
  - lib/vanagon/platform/defaults/debian-10-amd64.rb
176
177
  - lib/vanagon/platform/defaults/debian-11-aarch64.rb
177
178
  - lib/vanagon/platform/defaults/debian-11-amd64.rb