jara 1.1.0-java → 1.1.1-java
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 +4 -4
- data/lib/jara/releaser.rb +17 -15
- data/lib/jara/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: 4876a8d24b653c3efd13a52640da720e83c5789f
|
4
|
+
data.tar.gz: 270d33ba165e30a68da52e0ab67dff7b6bd6db70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 601092fc0c707da7015d3d77f2aa294baa03de41930dde5bf892a61da5bbacafb6fac0344fae8787c1f843888030e489cad5ce106616c61f09fe9e9b00676b85
|
7
|
+
data.tar.gz: ca03450c5649909c9c3286268a9693ae58da8011a3384b2483c4b34d03f5c642c9c0f861b50907362183a7d49e69087df5ec8fa2deb68685da04ca51ada6a0c1
|
data/lib/jara/releaser.rb
CHANGED
@@ -59,7 +59,9 @@ module Jara
|
|
59
59
|
raise JaraError, 'No environment set' unless @environment
|
60
60
|
raise JaraError, 'No bucket name set' unless @bucket_name
|
61
61
|
if !@re_release && (obj = find_remote_artifact)
|
62
|
-
|
62
|
+
s3_uri = 's3://%s/%s' % [@bucket_name, obj.key]
|
63
|
+
@logger.warn('An artifact for %s already exists: %s' % [branch_sha[0, 8], s3_uri])
|
64
|
+
s3_uri
|
63
65
|
else
|
64
66
|
local_path = find_local_artifact || build_artifact
|
65
67
|
upload_artifact(local_path)
|
@@ -134,21 +136,21 @@ module Jara
|
|
134
136
|
end
|
135
137
|
|
136
138
|
def upload_artifact(local_path)
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
)
|
149
|
-
end
|
150
|
-
@logger.info('Artifact uploaded to s3://%s/%s' % [@bucket_name, remote_path])
|
139
|
+
remote_path = [@environment, app_name, File.basename(local_path)].join('/')
|
140
|
+
content_md5 = Digest::MD5.file(local_path).base64digest
|
141
|
+
File.open(local_path, 'rb') do |io|
|
142
|
+
s3.put_object(
|
143
|
+
bucket: @bucket_name,
|
144
|
+
key: remote_path,
|
145
|
+
content_type: JAR_CONTENT_TYPE,
|
146
|
+
content_md5: content_md5,
|
147
|
+
metadata: metadata,
|
148
|
+
body: io,
|
149
|
+
)
|
151
150
|
end
|
151
|
+
s3_uri = 's3://%s/%s' % [@bucket_name, remote_path]
|
152
|
+
@logger.info('Artifact uploaded to %s' % s3_uri)
|
153
|
+
s3_uri
|
152
154
|
end
|
153
155
|
|
154
156
|
def find_remote_artifact
|
data/lib/jara/version.rb
CHANGED