uffizzi_core 2.1.9 → 2.1.11

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: 3b5eb7add82dd6971fa924c3af89c697d4b41871e2bcb39828722234ca68147f
4
- data.tar.gz: 6f2916c4409bf4f301292b48e12beba5bc9c68a54ba692c9b602b90a7b628f3f
3
+ metadata.gz: 2d07bd01d1db9c47d9db2fccc6709cbf3a35e86974012b1cb7fdadc4a39472d1
4
+ data.tar.gz: 85675fb9b5fed3f7b9c2ac2848034f9bdf634b89661edf3524e05c88e6c9f670
5
5
  SHA512:
6
- metadata.gz: 4bb838ada0804467cbb467ff05ba7347136cca2dc7f3856fe46db2e4716edafcc12f305d081ab8f4bd3aef5ad4dd2a0fb2e05e959b9f4fad4401f17b5f3f0b44
7
- data.tar.gz: 5ccf3309232f8e0ec107e31d1016c478ee54d2dab06d95d08326c14c8937d68f51af4e1bdd3242751b926b2655439828781d1b67609e82ae6684d050980aa6ca
6
+ metadata.gz: 1ba5b6a67ae28cbac577ada543853360df5da38c1287c2c77851ba38f81f89474e112effea8ae950396d964a03f9e973b9a078dfc39fcbfe97f5edc6505bd192
7
+ data.tar.gz: 02e5d630212c7968754d2aed37e9afd1686498b56357f058e0e9bc805824af7b5acd428b4a4423257b62c1b0a2032b9047b6d637f9668480db5a1203fd269ee1
@@ -30,7 +30,7 @@ module UffizziCore::Concerns::Models::User
30
30
  end
31
31
 
32
32
  def personal_account
33
- accounts.find_by(kind: UffizziCore::Account.kind.personal)
33
+ accounts.personal.find_by(owner_id: id)
34
34
  end
35
35
 
36
36
  def full_name
@@ -55,6 +55,10 @@ class UffizziCore::ActivityItemService
55
55
  notification_module.notify_about_failed_deployment(deployment) if notification_module.present?
56
56
  end
57
57
 
58
+ if deployed?(status) && UffizziCore::ContainerService.ingress_container?(container)
59
+ deployment.update(last_deploy_at: last_event.created_at)
60
+ end
61
+
58
62
  return unless [UffizziCore::Event.state.building, UffizziCore::Event.state.deploying].include?(status)
59
63
 
60
64
  UffizziCore::Deployment::ManageDeployActivityItemJob.perform_in(5.seconds, activity_item.id)
@@ -79,5 +83,9 @@ class UffizziCore::ActivityItemService
79
83
  def failed?(status)
80
84
  status == UffizziCore::Event.state.failed
81
85
  end
86
+
87
+ def deployed?(status)
88
+ status == UffizziCore::Event.state.deployed
89
+ end
82
90
  end
83
91
  end
@@ -55,6 +55,10 @@ class UffizziCore::ContainerService
55
55
  end.first
56
56
  end
57
57
 
58
+ def ingress_container?(container)
59
+ container.receive_incoming_requests?
60
+ end
61
+
58
62
  private
59
63
 
60
64
  def container_status(container, pods)
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddLastDeployAtToDeployments < ActiveRecord::Migration[6.1]
4
+ def up
5
+ add_column :uffizzi_core_deployments, :last_deploy_at, :datetime
6
+
7
+ UffizziCore::Deployment.where(last_deploy_at: nil).update_all('last_deploy_at = updated_at')
8
+ end
9
+
10
+ def down
11
+ remove_column :uffizzi_core_deployments, :last_deploy_at
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.1.9'
4
+ VERSION = '2.1.11'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.9
4
+ version: 2.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-07 00:00:00.000000000 Z
12
+ date: 2023-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm
@@ -1027,6 +1027,7 @@ files:
1027
1027
  - db/migrate/20220901110752_create_host_volume_files.rb
1028
1028
  - db/migrate/20220901165313_create_container_host_volume_files.rb
1029
1029
  - db/migrate/20220927113647_add_additional_subdomains_to_containers.rb
1030
+ - db/migrate/20230306142513_add_last_deploy_at_to_deployments.rb
1030
1031
  - db/seeds.rb
1031
1032
  - lib/tasks/uffizzi_core_tasks.rake
1032
1033
  - lib/uffizzi_core.rb