apt_stage_artifacts 0.8.1 → 0.9.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: ee106eeb8e60ac6a9d942ded6cd6fed67bc799ec2c77f4740d59a6c4c0667b27
4
- data.tar.gz: 1961201b900674777a81a9ec22959873cd5782bc5141b647b89fb893efe20356
3
+ metadata.gz: e22e83a8811e9598f4dc9fd27b639c743451fdc06e0502092daceb5cea04a9f8
4
+ data.tar.gz: 9d19f393ac7f403a8dbdd7e56e6888e6392d556a8da28c9b5190eefc0c0a6098
5
5
  SHA512:
6
- metadata.gz: 988779891f6d6729d1fb70beacdd721b46ffc08a0d0cb5694f5461f3c987b839f87dcdda8fa557050232d85ce539e501759da7440638a2ffc59eac1dc10e35a0
7
- data.tar.gz: 04e70a00aaef203277698f49e521ba0daf83c83d7b2f1752a39727e793ab53b1c6c06d25a95f1c4c07ed5c1d620bc599052a32fe311b27cc6ca45d057a6e810e
6
+ metadata.gz: ae8a11f11b2a4698b684c169d74943770945b9e1f04489c4eaf8a1e3bf28cdfb64d5fdd3629c5febb6eba5f84e4bc5a8e9dd9e3ad1cbab6f659b62eeeabf5a8b
7
+ data.tar.gz: dcc70849ba88e635c3fbf8d3022f74d0e136fab374f0f06d166208601479858b834765b6833265e7583638f6c0ae0245e8061a96d02ef48a76104896115df1c7
@@ -86,13 +86,15 @@ class AptStageArtifacts
86
86
  exit 1
87
87
  end
88
88
 
89
- logger.info "Searching for .deb packages in #{@top_directory}"
89
+ logger.info "Searching for puppetN/*.deb packages in #{@top_directory}"
90
90
  Dir.chdir(@top_directory) do
91
- @debian_artifacts = Dir['**/*.deb']
91
+ @debian_artifacts = Dir['*/puppet*/*.deb']
92
92
  end
93
93
  return unless @debian_artifacts.empty?
94
94
 
95
- logger.error 'No .deb files found. Nothing to do.'
95
+ logger.warn "This project does not contain artifacts suitable for shipping to the " \
96
+ "APT server. Expected repo layout is 'pkg/<debian codename>/puppet<N>/*.deb'. " \
97
+ "Skipping."
96
98
  exit 0
97
99
  end
98
100
 
@@ -137,7 +139,7 @@ class AptStageArtifacts
137
139
  when /^puppet(\d+)+$/
138
140
  puppet_version = Regexp.last_match(1)
139
141
  else
140
- fatal("Unknown repo name \"#{repo_name}\" in #{deb_file_path}")
142
+ fatal "Puppet version not found in \"#{deb_file_path}\"."
141
143
  end
142
144
 
143
145
  codename = deb_file_path.split('/')[-3]
@@ -153,6 +155,10 @@ class AptStageArtifacts
153
155
  }
154
156
  end
155
157
 
158
+ if manifest.empty?
159
+ fatal 'No manifest was generated from the artifact list. This is unexpected.'
160
+ end
161
+
156
162
  manifest_path = File.join(@top_directory, AptStageArtifacts::MANIFEST_JSON_FILENAME)
157
163
  File.open(manifest_path, 'w') do |f|
158
164
  f.write(manifest.to_json)
@@ -190,7 +196,8 @@ class AptStageArtifacts
190
196
 
191
197
  # Invoke the remote staging of the sent artifacts
192
198
  def invoke_remote_staging
193
- %x(ssh #{@staging_server} #{@remote_staging_command} #{@remote_tarball_path})
199
+ # Do this in a login shell so we get rvm PATH goodness
200
+ %x(ssh #{@staging_server} '/bin/bash -l -c "#{@remote_staging_command} #{@remote_tarball_path}"')
194
201
  return if $CHILD_STATUS.success?
195
202
 
196
203
  fatal "'ssh #{@staging_server} #{@remote_staging_command} #{@remote_tarball_path}' failed."
@@ -21,7 +21,7 @@ class AptStageArtifacts
21
21
 
22
22
  # From freight-add:
23
23
  # freight-add registers package with one or more manager/distro[/component] pairs (or triples).
24
- # component is optional and for apt defaults to 'main'.
24
+ # component is optional and for apt defaults to 'stable'.
25
25
 
26
26
  # These are valid APT components. We use 'stable' instead of 'main' established by convention
27
27
  # from docker dists (see https://download.docker.com/linux/ubuntu/dists/groovy)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class AptStageArtifacts
2
- VERSION = '0.8.1'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apt_stage_artifacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Release Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  requirements: []
182
- rubygems_version: 3.1.6
182
+ rubygems_version: 3.2.28
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Stages .deb artifacts to a remote freight repository