popito 0.0.6.alpha → 0.0.8.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: f356449a48844b0978ff411d2abade787d388e9de08d902a098dbe0e9a4ad965
4
- data.tar.gz: 637efab63db68b93cdf36eb1ad95d34f9294f4922c10f0da7dbefe1dd9aaaeaa
3
+ metadata.gz: a185e2e1244bfb7347732ad335ee4d6bd06059566fce5e6490cd0ff7d6c7df95
4
+ data.tar.gz: ee5bb06f7a6500086a432539ad60a7421202a43a4ed8fbedccd35a83600792f5
5
5
  SHA512:
6
- metadata.gz: d3189e2cc6b3ea5394b27e41df20797a08738538c99143cf0378b866a33edc31cd1b7f8b762a2d21f53327de992bdce465eb60940039bfdf46113718e73b8bbb
7
- data.tar.gz: '09d513b18d5f79b80f42ad72f1cea7c7f440e38a0f916b5307ba6bab4ab0ce8e8a7ae9bec2595ddd69a773cf3e31abccc89f59694a361a29c216ba2fa2e36f1b'
6
+ metadata.gz: ed90aafbbaf4aa6cde3e15c5f4cbf1149eb837aef5fc8f7aa49d3002bc9d8b15065ff8a69f68ed01620132a9e5c90b2b1ad09372b6c773e4ea4b17de53b8173f
7
+ data.tar.gz: 498eaacee7f0ac93f6c990fc5bd007ffd98cab0f70ac3f178a03e00dc9f6cda94eb7fc38c5510a4810227ca5786094cdf2e4ea6c189e62b15753303e490b1d3b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- popito (0.0.6.alpha)
4
+ popito (0.0.7.alpha)
5
5
  deep_merge (~> 1.2)
6
6
  erb (~> 2.2)
7
7
  json (~> 2.5)
data/exe/popito CHANGED
@@ -55,4 +55,5 @@ if params[:check] || params[:deploy]
55
55
  deployer = Popito::DeployExecutor.new(config_payload)
56
56
  deployer.check if params[:check]
57
57
  deployer.deploy if params[:deploy]
58
+ deployer.push_deployed_tag if params[:deploy]
58
59
  end
@@ -1,7 +1,6 @@
1
1
  require 'rest-client'
2
2
  require 'json'
3
3
  require 'minitar'
4
- require 'byebug'
5
4
  module Popito
6
5
  class ClientBase
7
6
  API_HOST = 'http://localhost:3000'.freeze
@@ -16,5 +16,24 @@ module Popito
16
16
  puts 'Applying generated files...'
17
17
  system "kubectl apply -f #{@deploy_files_dir}", exception: true
18
18
  end
19
+
20
+ def push_deployed_tag
21
+ yaml_build_config["build"].each do |build|
22
+ tag = build["tags"].first
23
+ puts "Pushing #{build["image"]}:#{tag} to #{build["image"]}:popito-#{config_payload.build_config[:ENVIRONMENT]}"
24
+ system "docker image tag #{build["image"]}:#{tag} #{build["image"]}:popito-#{config_payload.build_config[:ENVIRONMENT]}", exception: true
25
+ system "docker push #{build["image"]}:popito-#{config_payload.build_config['ENVIRONMENT']}", exception: true
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def yaml_build_config
32
+ @yaml_config ||= load_build_yaml
33
+ end
34
+
35
+ def load_build_yaml
36
+ YAML.safe_load(File.read("#{config_payload.build_path}/build.yaml"))
37
+ end
19
38
  end
20
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Popito
4
- VERSION = "0.0.6.alpha"
4
+ VERSION = "0.0.8.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.6.alpha
4
+ version: 0.0.8.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: 2022-11-22 00:00:00.000000000 Z
11
+ date: 2024-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -129,7 +129,7 @@ metadata:
129
129
  homepage_uri: http://github.com/platbr/popito
130
130
  source_code_uri: http://github.com/platbr/popito
131
131
  changelog_uri: http://github.com/platbr/popito/blob/master/CHANGELOG.md
132
- post_install_message:
132
+ post_install_message:
133
133
  rdoc_options: []
134
134
  require_paths:
135
135
  - lib
@@ -140,12 +140,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
140
  version: 2.5.0
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 1.3.1
145
+ version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.0.3.1
148
- signing_key:
147
+ rubygems_version: 3.5.3
148
+ signing_key:
149
149
  specification_version: 4
150
150
  summary: 'WIP: Build docker images for Rails Projects and deploy it on K8S using a
151
151
  Popito Server.'