popito 0.0.7.alpha → 0.0.9.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: 6e2be13dac05fb75e5aaf3be210a1a193574732d8c5c5e1eca1e96c374d3b639
4
- data.tar.gz: 88b56b6c0800773f4c592a3a02de28a058ceda00ba274732b515dc226a5ecbfd
3
+ metadata.gz: 84308a2a22723f86a57f7c72dac4925610db61e155f07288378f086efd5de436
4
+ data.tar.gz: f9f651cbe068cbc472dfbf093ff6e60f8c01a64f0434585baf811670581d629c
5
5
  SHA512:
6
- metadata.gz: 1690ec1e5a35d91cb1f60a7f7509b8476cead83873eedba99e82021e0204f90a09967e7682ea263ce432cee5bc460120d7dbf81bafb734f2bea8dd678d09f4e8
7
- data.tar.gz: c120219eb063731215970a82868fc5312134546de46ee971c23e181f57fada6ab6cef0ac16a4f2a772f5d9e7fcb9b896546fab7b25cd2455cdacfe01dbf5caea
6
+ metadata.gz: d7f5bddec397316c0dadbc2a0ca630d3666ecf3d3b139b0ae287e92a59080c684c5a825c8344db2e25ab155029e2d9358615477018d719d9b4ca4197282177f8
7
+ data.tar.gz: 0707e25bfaeb58a5ffc2be76e2165ff07db4e06f278f540ac50da2b273025ed25c879b0529c9ba6c9423b8fabdd91a3904b811c477805e27cb8fc3508e3452c7
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
@@ -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.deploy_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.7.alpha"
4
+ VERSION = "0.0.9.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.7.alpha
4
+ version: 0.0.9.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.'