packaging 0.99.39 → 0.99.40
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 +5 -5
- data/lib/packaging/artifactory.rb +14 -0
- data/tasks/ship.rake +5 -1
- metadata +22 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 29234ce00ec3d4e6b806de21de5146a170c5ae50
|
4
|
+
data.tar.gz: 225084d9ba126f53ef36aab40c3a35a48696a5bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f9ec133dc94d0cd44ff0c8a926ced515688a2bbfbf9810ab4cd7c5a7c9b3e0dabb2224c14814723965c3477fc0a0bc0381a6030519a46dfd70cb55f4f181ebd
|
7
|
+
data.tar.gz: 0a030c97eb33c623b9852a0459a45a3e2ec0906cafd9d5a9536a5b433852687358f3444c183e524244f809422252db15b7c05ce7f8240a4e96a2bf14b729a10d
|
@@ -190,6 +190,20 @@ module Pkg
|
|
190
190
|
properties_hash
|
191
191
|
end
|
192
192
|
|
193
|
+
# Basic method to check if a package exists on artifactory
|
194
|
+
# @param package [String] The full relative path to the package to be
|
195
|
+
# checked, relative from the current working directory
|
196
|
+
# Return true if package already exists on artifactory
|
197
|
+
def package_exists_on_artifactory?(package)
|
198
|
+
check_authorization
|
199
|
+
artifact = Artifactory::Resource::Artifact.search(name: File.basename(package), :artifactory_uri => @artifactory_uri)
|
200
|
+
if artifact.empty?
|
201
|
+
return false
|
202
|
+
else
|
203
|
+
return true
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
193
207
|
# @param package [String] The full relative path to the package to be
|
194
208
|
# shipped, relative from the current working directory
|
195
209
|
def deploy_package(package)
|
data/tasks/ship.rake
CHANGED
@@ -545,7 +545,11 @@ namespace :pl do
|
|
545
545
|
|
546
546
|
local_dir = args.local_dir || 'pkg'
|
547
547
|
Dir.glob("#{local_dir}/**/*").reject { |e| File.directory? e }.each do |artifact|
|
548
|
-
artifactory.
|
548
|
+
if artifactory.package_exists_on_artifactory?(artifact)
|
549
|
+
warn "Attempt to upload '#{artifact}' failed. Package already exists!"
|
550
|
+
else
|
551
|
+
artifactory.deploy_package(artifact)
|
552
|
+
end
|
549
553
|
end
|
550
554
|
end
|
551
555
|
|
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.40
|
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-08-
|
11
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -224,33 +224,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
requirements: []
|
227
|
-
|
227
|
+
rubyforge_project:
|
228
|
+
rubygems_version: 2.6.9
|
228
229
|
signing_key:
|
229
230
|
specification_version: 4
|
230
231
|
summary: Puppet Labs' packaging automation
|
231
232
|
test_files:
|
232
|
-
- spec/lib/packaging_spec.rb
|
233
|
-
- spec/lib/packaging/gem_spec.rb
|
234
|
-
- spec/lib/packaging/tar_spec.rb
|
235
233
|
- spec/lib/packaging/paths_spec.rb
|
236
|
-
- spec/lib/packaging/
|
237
|
-
- spec/lib/packaging/deb/repo_spec.rb
|
238
|
-
- spec/lib/packaging/artifactory_spec.rb
|
239
|
-
- spec/lib/packaging/platforms_spec.rb
|
240
|
-
- spec/lib/packaging/rpm/repo_spec.rb
|
241
|
-
- spec/lib/packaging/deb_spec.rb
|
234
|
+
- spec/lib/packaging/sign_spec.rb
|
242
235
|
- spec/lib/packaging/config_spec.rb
|
243
|
-
- spec/lib/packaging/util/
|
244
|
-
- spec/lib/packaging/util/git_spec.rb
|
236
|
+
- spec/lib/packaging/util/execution_spec.rb
|
245
237
|
- spec/lib/packaging/util/os_spec.rb
|
238
|
+
- spec/lib/packaging/util/version_spec.rb
|
239
|
+
- spec/lib/packaging/util/git_spec.rb
|
246
240
|
- spec/lib/packaging/util/jenkins_spec.rb
|
247
|
-
- spec/lib/packaging/util/
|
248
|
-
- spec/lib/packaging/util/
|
241
|
+
- spec/lib/packaging/util/rake_utils_spec.rb
|
242
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
249
243
|
- spec/lib/packaging/util/git_tag_spec.rb
|
250
|
-
- spec/lib/packaging/util/
|
251
|
-
- spec/lib/packaging/util/misc_spec.rb
|
244
|
+
- spec/lib/packaging/util/file_spec.rb
|
252
245
|
- spec/lib/packaging/util/net_spec.rb
|
253
|
-
- spec/lib/packaging/util/
|
254
|
-
- spec/lib/packaging/util/
|
246
|
+
- spec/lib/packaging/util/misc_spec.rb
|
247
|
+
- spec/lib/packaging/util/ship_spec.rb
|
255
248
|
- spec/lib/packaging/repo_spec.rb
|
256
|
-
- spec/lib/packaging/
|
249
|
+
- spec/lib/packaging/tar_spec.rb
|
250
|
+
- spec/lib/packaging/retrieve_spec.rb
|
251
|
+
- spec/lib/packaging/platforms_spec.rb
|
252
|
+
- spec/lib/packaging/deb_spec.rb
|
253
|
+
- spec/lib/packaging/deb/repo_spec.rb
|
254
|
+
- spec/lib/packaging/rpm/repo_spec.rb
|
255
|
+
- spec/lib/packaging/gem_spec.rb
|
256
|
+
- spec/lib/packaging/artifactory_spec.rb
|
257
|
+
- spec/lib/packaging_spec.rb
|