manifest-builder 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cicd/builder/manifest/mixlib/repo/artifactory.rb +36 -11
- data/lib/cicd/builder/manifest/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fca672bc384323782ececfc914b4aad61b66e6e
|
4
|
+
data.tar.gz: 361f062381aa0c5725298087193aefd0ec13a18e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df05492e33d0542fb90fd4b803735e7b3729cbabf0822ae5ec965993d012b679b9f3c9a8ce64f296fa32691c4a484094530a9174abbebff51396196fa9356c37
|
7
|
+
data.tar.gz: 992e851fe4f11a89b2a5794195e954313ecba00e07f1a7ba95dcb6e883cc414f41b84b88ba9e8ab05de3e10906e5534da2616b07c241deacf35541753768cea4
|
data/Gemfile.lock
CHANGED
@@ -38,6 +38,18 @@ module CiCd
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
|
+
@vars[:artifacts].each do |art|
|
42
|
+
if art[:data][:temp].is_a?(FalseClass)
|
43
|
+
if File.exists?(art[:data][:file])
|
44
|
+
File.unlink(art[:data][:file]) if File.exists?(art[:data][:file])
|
45
|
+
art[:data].delete(:file)
|
46
|
+
art[:data].delete(:temp)
|
47
|
+
else
|
48
|
+
@logger.warn "Temporary file disappeared: #{data.ai}"
|
49
|
+
@vars[:return_code] = Errors::TEMP_FILE_MISSING
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
41
53
|
@vars[:return_code]
|
42
54
|
end
|
43
55
|
|
@@ -87,16 +99,14 @@ module CiCd
|
|
87
99
|
opts = perm
|
88
100
|
end + '.properties'
|
89
101
|
IO.write(data[:file], data[:data])
|
90
|
-
|
102
|
+
data[:temp] = false
|
91
103
|
data[:sha1] = Digest::SHA1.file(data[:file]).hexdigest
|
92
|
-
data[:md5]
|
104
|
+
data[:md5] = Digest::MD5.file(data[:file]).hexdigest
|
93
105
|
data[:name] = amn
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
data: data.dup,
|
99
|
-
})
|
106
|
+
@vars[:artifacts] << {
|
107
|
+
key: amn,
|
108
|
+
data: data.dup,
|
109
|
+
}
|
100
110
|
manifest[amn]={ amn => "#{@vars[:build_ver]}-#{@vars[:build_num]}" }
|
101
111
|
|
102
112
|
maybeUploadArtifactoryObject(data: data, artifact_module: amn, artifact_version: data[:version] || @vars[:version], file_name: '', file_ext: 'properties')
|
@@ -104,16 +114,31 @@ module CiCd
|
|
104
114
|
|
105
115
|
# ---------------------------------------------------------------------------------------------------------------
|
106
116
|
def createProductManifests(manifest)
|
107
|
-
manifest.each do |mod, man|
|
117
|
+
manifest.dup.each do |mod, man|
|
108
118
|
manifest_data = ''
|
109
119
|
man.each do |k, v|
|
110
120
|
manifest_data += "#{k}=#{v}\n"
|
111
121
|
end
|
112
122
|
data = {module: mod, data: manifest_data, version: @vars[:build_ver], build: @vars[:build_num], properties: @properties_matrix}
|
113
|
-
tempArtifactFile("#{mod}-manifest", data)
|
123
|
+
# tempArtifactFile("#{mod}-manifest", data)
|
124
|
+
|
125
|
+
data[:file] = Dir::Tmpname.create("#{mod}-manifest") do |tmpnam, n, opts|
|
126
|
+
mode = File::RDWR|File::CREAT|File::EXCL
|
127
|
+
perm = 0600
|
128
|
+
opts = perm
|
129
|
+
end + '.properties'
|
130
|
+
IO.write(data[:file], data[:data])
|
131
|
+
data[:temp] = false
|
114
132
|
data[:sha1] = Digest::SHA1.file(data[:file]).hexdigest
|
115
|
-
data[:md5]
|
133
|
+
data[:md5] = Digest::MD5.file(data[:file]).hexdigest
|
116
134
|
data[:name] = "#{mod}-manifest"
|
135
|
+
@vars[:artifacts] << {
|
136
|
+
key: "#{mod}-manifest",
|
137
|
+
data: data.dup,
|
138
|
+
}
|
139
|
+
# noinspection RubyStringKeysInHashInspection
|
140
|
+
manifest["#{mod}-manifest"]={ "#{mod}-manifest" => "#{@vars[:build_ver]}-#{@vars[:build_num]}" }
|
141
|
+
|
117
142
|
maybeUploadArtifactoryObject(data: data, artifact_module: data[:name], artifact_version: data[:version] || @vars[:version], file_name: '', file_ext: 'properties') # -#{@vars[:variant]}
|
118
143
|
end
|
119
144
|
end
|