packaging 0.99.29 → 0.99.30
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cfddfe342677b102df76026925a4f2d6c63d3ab462f11c663f370a66a54bcc0
|
4
|
+
data.tar.gz: 7b4b4bf61cd61f5b131ece5020bf6cb99ef6551118ddaeec5884036718c41078
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779471e6fc2b8b379ac5a1e30c8f0d4002406b2ef267c8ff3fdd7384a97d61e29a9616b77b03851fd65ece2c95007a079b933eeeb0465d89e82260ca4cfb959d
|
7
|
+
data.tar.gz: 83d313b8e9342138e946e0d652c3b88880a7f16c7d2eda18f54bfb3cd793102201cd787be0f39eb0981757dd79bd63707f41b6ce36733d831f80f511c526dc9d
|
@@ -266,10 +266,12 @@ module Pkg
|
|
266
266
|
# @param ref [String] tag or SHA of package(s) to be promoted
|
267
267
|
# @param platform_tag [String] the platform tag of the artifact
|
268
268
|
# ex. el-7-x86_64, ubuntu-18.04-amd64
|
269
|
-
# @param
|
269
|
+
# @param repository [String] the repository to promote
|
270
270
|
# the artifact to. Will prepend 'rpm_' or 'debian_' to the repositories
|
271
271
|
# depending on package type
|
272
|
-
|
272
|
+
# @param debian_component [String] the debian component to promote packages
|
273
|
+
# into. Optional.
|
274
|
+
def promote_package(pkg, ref, platform_tag, repository, debian_component = nil)
|
273
275
|
# load package metadata
|
274
276
|
yaml_content = retrieve_yaml_data(pkg, ref)
|
275
277
|
yaml_data = YAML::load(yaml_content)
|
@@ -286,17 +288,21 @@ module Pkg
|
|
286
288
|
# This makes an assumption that we're using some consistent repo names
|
287
289
|
# but need to either prepend 'rpm_' or 'debian_' based on package type
|
288
290
|
if File.extname(artifact_name) == '.rpm'
|
289
|
-
|
291
|
+
promotion_path = "rpm_#{repository}/#{platform_tag}/#{artifact_name}"
|
290
292
|
elsif File.extname(artifact_name) == '.deb'
|
291
|
-
|
293
|
+
promotion_path = "debian_#{repository}/#{platform_tag}/#{artifact_name}"
|
294
|
+
properties = { 'deb.component' => debian_component } unless debian_component.nil?
|
292
295
|
else
|
293
296
|
raise "Error: Unknown promotion repository for #{artifact_name}! Only .rpm and .deb files are supported!"
|
294
297
|
end
|
295
298
|
|
296
299
|
begin
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
+
puts "promoting #{artifact_name} to #{promotion_path}"
|
301
|
+
artifact_to_promote[0].copy(promotion_path)
|
302
|
+
unless properties.nil?
|
303
|
+
artifacts = Artifactory::Resource::Artifact.search(name: artifact_name, :artifactory_uri => @artifactory_uri)
|
304
|
+
promoted_artifact = artifacts.select { |artifact| artifact.download_uri =~ %r{#{promotion_path}} }.first
|
305
|
+
promoted_artifact.properties(properties)
|
300
306
|
end
|
301
307
|
rescue Artifactory::Error::HTTPError => e
|
302
308
|
if e.message =~ /destination and source are the same/i
|
data/lib/packaging/util/ship.rb
CHANGED
@@ -140,7 +140,7 @@ module Pkg::Util::Ship
|
|
140
140
|
if packages_have_shipped
|
141
141
|
Pkg::Platforms.platform_tags_for_package_format('dmg').each do |platform_tag|
|
142
142
|
# Create the latest symlink for the current supported repo
|
143
|
-
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(platform_tag, remote_path), 'dmg')
|
143
|
+
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(platform_tag, remote_path, opts[:nonfinal]), 'dmg')
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
@@ -157,8 +157,8 @@ module Pkg::Util::Ship
|
|
157
157
|
create_rolling_repo_link(Pkg::Platforms.generic_platform_tag('windows'), Pkg::Config.msi_staging_server, remote_path, opts[:nonfinal])
|
158
158
|
if packages_have_shipped
|
159
159
|
# Create the symlinks for the latest supported repo
|
160
|
-
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(Pkg::Platforms.generic_platform_tag('windows'), remote_path), 'msi', arch: 'x64')
|
161
|
-
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(Pkg::Platforms.generic_platform_tag('windows'), remote_path), 'msi', arch: 'x86')
|
160
|
+
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(Pkg::Platforms.generic_platform_tag('windows'), remote_path, opts[:nonfinal]), 'msi', arch: 'x64')
|
161
|
+
Pkg::Util::Net.remote_create_latest_symlink(Pkg::Config.project, Pkg::Paths.artifacts_path(Pkg::Platforms.generic_platform_tag('windows'), remote_path, opts[:nonfinal]), 'msi', arch: 'x86')
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/fixtures/config/ext/../params.yaml
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/fixtures/config/ext/../params.yaml
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.99.
|
4
|
+
version: 0.99.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -223,7 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
|
-
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 2.7.6
|
227
228
|
signing_key:
|
228
229
|
specification_version: 4
|
229
230
|
summary: Puppet Labs' packaging automation
|