envirobly 0.4.1 → 0.4.2

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: a692c3ec890efdcb6ddf861e0503f3b64fe7266bcd460e4744aec19ab559fbcd
4
- data.tar.gz: b65bf97e5d0e776035785b28566075818c2dd6db27a99c857a6300b1a4b7e9c3
3
+ metadata.gz: 7cf07e75c65933a5f7c064588ac13a36ee5af3e698fc82f90affc0960bf7d170
4
+ data.tar.gz: 2f721b799aeb0b2725c92b75b9f1d63b461ad5cfd44d095481aea5c809bd1a2c
5
5
  SHA512:
6
- metadata.gz: 21b037970cc3dd974cb5f6660ff33fc846973565794b2601a7a64c1057c00fd320f673345428434184e9b17fbd3dc62a71d1c4495d0c32df5707921337d2c5ad
7
- data.tar.gz: 86cf8cfce266fd410e669e05c29c0b28d297cba701fb2c991a759f45e0eb5b3ce61033f44d83f77269e0bc80feaae918172f587fa5546439804ec04b09e7f2cc
6
+ metadata.gz: a37f7b8895957e017ddab73d991c1a34b7b50aeff1e491caf923164e3e6c5abe8ddc67900371fc8dc1c7a552c3e2c930e9cb2b92174953531c87fc495debf357
7
+ data.tar.gz: 43075318aa04c61690e71665823e19da68c2797e1d4534433235a4f3f46254343d454abaa9cd367b641184452df6546ad5f9f447a89e51943dc34084f08202a7
@@ -28,7 +28,8 @@ class Envirobly::Deployment
28
28
  config: config.to_h
29
29
  }
30
30
 
31
- puts params.to_json
31
+ puts "Deployment config:"
32
+ puts params.to_yaml
32
33
 
33
34
  unless environment =~ URL_MATCHER
34
35
  if project_url = config.dig("remote", "origin")
@@ -41,18 +42,20 @@ class Envirobly::Deployment
41
42
 
42
43
  @api = Envirobly::Api.new
43
44
  response = @api.create_deployment params
44
- @url = response.object.fetch("url")
45
- response = @api.get_deployment_with_delay_and_retry @url
45
+ deployment_url = response.object.fetch("url")
46
+ response = @api.get_deployment_with_delay_and_retry deployment_url
46
47
  @credentials = Envirobly::Aws::Credentials.new response.object.fetch("credentials")
47
48
  @bucket = response.object.fetch("bucket")
48
49
 
49
- if archive_commit_and_upload
50
- $stderr.puts "Build context uploaded."
51
- else
50
+ puts "Uploading build context, please wait..."
51
+ unless archive_commit_and_upload
52
52
  $stderr.puts "Error exporting build context. Aborting."
53
53
  exit 1
54
54
  end
55
55
 
56
+ puts "Build context uploaded."
57
+ @api.put_as_json deployment_url
58
+
56
59
  # TODO: Output URL to watch the deployment progress
57
60
  end
58
61
 
@@ -63,13 +66,6 @@ class Envirobly::Deployment
63
66
 
64
67
  def archive_commit_and_upload
65
68
  `git archive --format=tar.gz #{@commit.ref} | #{@credentials.as_inline_env_vars} aws s3 cp - #{archive_uri}`
66
- $?.success?.tap do |result|
67
- params = {
68
- deployment: {
69
- build_context_available: result
70
- }
71
- }
72
- @api.put_as_json @url, params: params
73
- end
69
+ $?.success?
74
70
  end
75
71
  end
@@ -1,3 +1,3 @@
1
1
  module Envirobly
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envirobly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Starsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-09 00:00:00.000000000 Z
11
+ date: 2024-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor