escobar 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/escobar/heroku/build_request.rb +4 -0
- data/lib/escobar/heroku/pipeline.rb +6 -16
- data/lib/escobar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff75fb2f007ee2572fc7ddb28dfe605b6cdea6da
|
4
|
+
data.tar.gz: b5a26ee3982f61ca17da2d7f7d0ed79563af0329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b397ad8902df738d4eaef2708f33347bdbaacfdacc5c2d722f84ad8dcb55220c7883b03993f53c40466f3dfeaef0effdde90182f2c5139bc21025947756d610
|
7
|
+
data.tar.gz: 7bae6a4857e338f692557d12bbe42ae8777947ad76bccfad4688b37b09f4c654c3a66140f5a911325b2a9df5e22792a915a57e4d65e7fc459aa6ed2587ffc98e
|
@@ -30,6 +30,10 @@ module Escobar
|
|
30
30
|
Error.new_from_build_request(self, message)
|
31
31
|
end
|
32
32
|
|
33
|
+
def cache_key
|
34
|
+
"escobar-build-request-#{app.name}"
|
35
|
+
end
|
36
|
+
|
33
37
|
def create(task, environment, ref, forced, custom_payload)
|
34
38
|
if app.locked?
|
35
39
|
raise error_for("Application requires second factor: #{app.name}")
|
@@ -91,23 +91,24 @@ module Escobar
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
|
95
|
-
def create_deployment(ref, environment, force = false, custom_payload = {})
|
94
|
+
def default_heroku_application(environment)
|
96
95
|
app = environments[environment] && environments[environment].last
|
97
96
|
unless app
|
98
97
|
raise ArgumentError, "No '#{environment}' environment for #{name}."
|
99
98
|
end
|
99
|
+
app.app
|
100
|
+
end
|
100
101
|
|
101
|
-
|
102
|
+
def create_deployment(ref, environment, force = false, payload = {})
|
103
|
+
heroku_app = default_heroku_application(environment)
|
102
104
|
|
103
105
|
build_request = heroku_app.build_request_for(self)
|
104
106
|
heroku_build = build_request.create(
|
105
|
-
"deploy", environment, ref, force,
|
107
|
+
"deploy", environment, ref, force, payload
|
106
108
|
)
|
107
109
|
|
108
110
|
heroku_build
|
109
111
|
end
|
110
|
-
# rubocop:enable Metrics/LineLength
|
111
112
|
|
112
113
|
def get(path)
|
113
114
|
response = kolkrabbi_client.get do |request|
|
@@ -146,17 +147,6 @@ module Escobar
|
|
146
147
|
create_deployment_status(url, payload)
|
147
148
|
end
|
148
149
|
|
149
|
-
def create_heroku_build(app_name, sha)
|
150
|
-
body = {
|
151
|
-
source_blob: {
|
152
|
-
url: github_client.archive_link(sha),
|
153
|
-
version: sha[0..7],
|
154
|
-
version_description: "#{github_repository}:#{sha}"
|
155
|
-
}
|
156
|
-
}
|
157
|
-
client.heroku.post("/apps/#{app_name}/builds", body)
|
158
|
-
end
|
159
|
-
|
160
150
|
def github_client
|
161
151
|
@github_client ||= Escobar::GitHub::Client.new(client.github_token,
|
162
152
|
github_repository)
|
data/lib/escobar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escobar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Donohoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|