popito 0.0.2.alpha → 0.0.3.alpha

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: 3a9d70fc64c62da1cec61bd91b7e4b6ae012b2399888cb5eb97fd16896f0d1a5
4
- data.tar.gz: d336b6c6d8deece10e61af4e323c24e1068435fbcff31dfaf2d4f50dadbced60
3
+ metadata.gz: cd7717c2f4c52904d7c0aa5405e5a8da53b48050e540a3a5609cb7dcfabc7c7a
4
+ data.tar.gz: 52c9f6590e26db96ac09eff3d750df1576f2712ad14987de0c71c9a3db56b2ed
5
5
  SHA512:
6
- metadata.gz: 991d30945797a6e820660bc9a8211f6a96831f1fc007f11bc42150b076dd696bd736f43cddd4ccdb996ef1021b44316bc1e46a7c9a95a5131124264085fd0aa1
7
- data.tar.gz: f91a46bd0fb607f8ecd00e303149c6c4dca414275ce303a14818a97db351126e5b79d181f5d4262f2683232bf4f98e529ba15389e817954bce3cad1ec6519323
6
+ metadata.gz: a7fea9b996e81c47a8f0d3fa28d0673745b9824c5d922e243007eb93065546f7e040f3ec5143a036ae4e42d5942fb8e0f68923d9fdf9dbfbca0308f3912aee6d
7
+ data.tar.gz: 4bef414b14c32869ee6ad1ac94ab09b835422f6054a6d291de3cafd94f5102712e198332fec66c9685fc4d628f55c33f94726d83c419875ed20464473052cf05
data/.byebug_history CHANGED
@@ -1,4 +1,25 @@
1
1
  q
2
+ build_config
3
+ q
4
+ build_config
5
+ q
6
+ build_config = JSON.parse(params[:"build-config-json"] || "{}").merge(
7
+ {
8
+ IMAGE_TAG: params[:tag],
9
+ IMAGE_TAG_ALT: params[:tag_alt],
10
+ ENVIRONMENT: params[:env]
11
+ }
12
+ )
13
+ params[:"build-config-json"]
14
+ params
15
+ params[:build_config_json]
16
+ params[:build_config]params[:build_config_json]
17
+ q
18
+ build_config
19
+ config_payload
20
+ c
21
+ build_config
22
+ q
2
23
  params
3
24
  q
4
25
  params
@@ -233,15 +254,3 @@ c
233
254
  container["config"]
234
255
  c
235
256
  container["config"]
236
- container.config
237
- container
238
- c
239
- container
240
- container.config
241
- c
242
- container.config
243
- c
244
- container.config
245
- c
246
- container.config
247
- container
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- popito (0.0.2.alpha)
4
+ popito (0.0.3.alpha)
5
5
  deep_merge (~> 1.2)
6
6
  erb (~> 2.2)
7
7
  json (~> 2.5)
@@ -24,7 +24,7 @@ GEM
24
24
  json (2.5.1)
25
25
  mime-types (3.3.1)
26
26
  mime-types-data (~> 3.2015)
27
- mime-types-data (3.2021.0704)
27
+ mime-types-data (3.2021.0901)
28
28
  minitar (0.9)
29
29
  netrc (0.11.0)
30
30
  rake (13.0.3)
@@ -35,10 +35,11 @@ GEM
35
35
  netrc (~> 0.8)
36
36
  unf (0.1.4)
37
37
  unf_ext
38
- unf_ext (0.0.7.7)
38
+ unf_ext (0.0.8)
39
39
  yaml (0.1.1)
40
40
 
41
41
  PLATFORMS
42
+ ruby
42
43
  x86_64-darwin-20
43
44
 
44
45
  DEPENDENCIES
data/exe/popito CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
-
3
+ # require 'byebug'
4
4
  require 'optparse'
5
5
  require_relative '../lib/popito/deployer/deployer'
6
6
 
@@ -15,10 +15,11 @@ OptionParser.new do |opts|
15
15
  opts.on('--env ENVIRONMENT', 'It define environment used to build images and deploy files.')
16
16
  opts.on('--endpoint https://popito.mydomain.com', 'It defines popito endpoint.')
17
17
  opts.on('--token POPITO_TOKEN', 'This popito token used to auth this client in a specific project.')
18
+ opts.on('--build-config-json JSON_STRING', 'You can set any build config at execution time.')
18
19
  opts.on('--path ./project_path', 'Root folder of the app.')
19
20
  end.parse!(into: params)
20
21
 
21
- raise ArgumentError, 'You can choose --deploy and --check together.' if params[:check] && params[:deploy]
22
+ raise ArgumentError, 'You can\'t use --deploy and --check together.' if params[:check] && params[:deploy]
22
23
 
23
24
  stages = []
24
25
  stages.push('build') if params[:build]
@@ -26,16 +27,20 @@ stages.push('release') if params[:release]
26
27
  stages.push('check') if params[:check]
27
28
  stages.push('deploy') if params[:deploy]
28
29
 
30
+ build_config = JSON.parse(params[:"build-config-json"] || "{}").merge(
31
+ {
32
+ IMAGE_TAG: params[:tag],
33
+ IMAGE_TAG_ALT: params[:tag_alt],
34
+ ENVIRONMENT: params[:env]
35
+ }
36
+ )
37
+
29
38
  config_payload = Popito::ConfigPayload.new(
30
39
  project_path: params[:path],
31
40
  stages: stages,
32
41
  project_token: params[:token],
33
42
  api_endpoint: params[:endpoint],
34
- build_config: {
35
- IMAGE_TAG: params[:tag],
36
- IMAGE_TAG_ALT: params[:tag_alt],
37
- ENVIRONMENT: params[:env]
38
- }
43
+ build_config: build_config
39
44
  )
40
45
 
41
46
  if params[:build] || params[:release]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Popito
4
- VERSION = "0.0.2.alpha"
4
+ VERSION = "0.0.3.alpha"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.alpha
4
+ version: 0.0.3.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wagner Caixeta
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -130,7 +130,7 @@ metadata:
130
130
  homepage_uri: http://github.com/platbr/popito
131
131
  source_code_uri: http://github.com/platbr/popito
132
132
  changelog_uri: http://github.com/platbr/popito/blob/master/CHANGELOG.md
133
- post_install_message:
133
+ post_install_message:
134
134
  rdoc_options: []
135
135
  require_paths:
136
136
  - lib
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: 1.3.1
147
147
  requirements: []
148
148
  rubygems_version: 3.1.4
149
- signing_key:
149
+ signing_key:
150
150
  specification_version: 4
151
151
  summary: 'WIP: Build docker images for Rails Projects and deploy it on K8S using a
152
152
  Popito Server.'