uffizzi_core 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/clients/uffizzi_core/docker_hub_client.rb +2 -0
  3. data/app/clients/uffizzi_core/github_container_registry_client/request_result.rb +7 -0
  4. data/app/clients/uffizzi_core/github_container_registry_client.rb +52 -0
  5. data/app/controllers/concerns/uffizzi_core/dependency_injection_concern.rb +2 -2
  6. data/app/controllers/uffizzi_core/api/cli/v1/account/credentials_controller.rb +45 -9
  7. data/app/controllers/uffizzi_core/api/cli/v1/projects/compose_files_controller.rb +2 -2
  8. data/app/controllers/uffizzi_core/api/cli/v1/projects/deployments/application_controller.rb +1 -1
  9. data/app/controllers/uffizzi_core/api/cli/v1/projects/deployments_controller.rb +41 -10
  10. data/app/controllers/uffizzi_core/api/cli/v1/projects/secrets_controller.rb +18 -26
  11. data/app/controllers/uffizzi_core/application_controller.rb +9 -3
  12. data/app/errors/uffizzi_core/deployment/image_pull_error.rb +10 -0
  13. data/app/forms/uffizzi_core/api/cli/v1/account/credential/check_credential_form.rb +16 -0
  14. data/app/forms/uffizzi_core/api/cli/v1/account/credential/create_form.rb +1 -1
  15. data/app/forms/uffizzi_core/api/cli/v1/compose_file/check_credentials_form.rb +2 -2
  16. data/app/forms/uffizzi_core/api/cli/v1/compose_file/cli_form.rb +1 -18
  17. data/app/forms/uffizzi_core/api/cli/v1/compose_file/template_form.rb +1 -1
  18. data/app/forms/uffizzi_core/api/cli/v1/deployment/update_form.rb +90 -0
  19. data/app/forms/uffizzi_core/api/cli/v1/project/update_form.rb +1 -31
  20. data/app/forms/uffizzi_core/api/cli/v1/secret/bulk_assign_form.rb +39 -0
  21. data/app/jobs/uffizzi_core/deployment/manage_deploy_activity_item_job.rb +22 -3
  22. data/app/lib/uffizzi_core/rbac/user_access_service.rb +12 -14
  23. data/app/models/uffizzi_core/account.rb +1 -19
  24. data/app/models/uffizzi_core/activity_item.rb +1 -6
  25. data/app/models/uffizzi_core/build.rb +1 -1
  26. data/app/models/uffizzi_core/comment.rb +1 -1
  27. data/app/models/uffizzi_core/compose_file.rb +1 -1
  28. data/app/models/uffizzi_core/config_file.rb +1 -1
  29. data/app/models/uffizzi_core/container.rb +1 -1
  30. data/app/models/uffizzi_core/container_config_file.rb +1 -1
  31. data/app/models/uffizzi_core/coupon.rb +1 -1
  32. data/app/models/uffizzi_core/credential/github_container_registry.rb +4 -0
  33. data/app/models/uffizzi_core/credential.rb +3 -6
  34. data/app/models/uffizzi_core/deployment.rb +11 -2
  35. data/app/models/uffizzi_core/event.rb +1 -1
  36. data/app/models/uffizzi_core/invitation.rb +1 -1
  37. data/app/models/uffizzi_core/membership.rb +1 -1
  38. data/app/models/uffizzi_core/payment.rb +1 -1
  39. data/app/models/uffizzi_core/price.rb +1 -1
  40. data/app/models/uffizzi_core/product.rb +1 -1
  41. data/app/models/uffizzi_core/project.rb +5 -11
  42. data/app/models/uffizzi_core/rating.rb +1 -1
  43. data/app/models/uffizzi_core/repo/github_container_registry.rb +4 -0
  44. data/app/models/uffizzi_core/repo.rb +1 -11
  45. data/app/models/uffizzi_core/role.rb +2 -2
  46. data/app/models/uffizzi_core/secret.rb +9 -0
  47. data/app/models/uffizzi_core/template.rb +1 -1
  48. data/app/models/uffizzi_core/user.rb +1 -1
  49. data/app/models/uffizzi_core/user_project.rb +1 -1
  50. data/app/policies/uffizzi_core/api/cli/v1/account/credentials_policy.rb +8 -0
  51. data/app/policies/uffizzi_core/api/cli/v1/projects/deployments_policy.rb +4 -0
  52. data/app/repositories/uffizzi_core/credential_repo.rb +17 -22
  53. data/app/repositories/uffizzi_core/deployment_repo.rb +1 -0
  54. data/app/serializers/uffizzi_core/api/cli/v1/projects/deployment_serializer/container_serializer.rb +8 -0
  55. data/app/serializers/uffizzi_core/api/cli/v1/projects/secret_serializer.rb +5 -0
  56. data/app/serializers/uffizzi_core/controller/apply_config_file/config_file_serializer.rb +5 -0
  57. data/app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb +7 -3
  58. data/app/serializers/uffizzi_core/controller/deploy_containers/container_serializer/container_config_file_serializer/config_file_serializer.rb +8 -0
  59. data/app/serializers/uffizzi_core/controller/deploy_containers/container_serializer/container_config_file_serializer.rb +7 -0
  60. data/app/serializers/uffizzi_core/controller/deploy_containers/container_serializer.rb +4 -3
  61. data/app/services/uffizzi_core/activity_item_service.rb +16 -26
  62. data/app/services/uffizzi_core/compose_file/builders/container_builder_service.rb +11 -18
  63. data/app/services/uffizzi_core/compose_file/container_service.rb +13 -9
  64. data/app/services/uffizzi_core/compose_file/dependencies_service.rb +1 -0
  65. data/app/services/uffizzi_core/compose_file/services_options_service.rb +2 -2
  66. data/app/services/uffizzi_core/compose_file_service.rb +148 -0
  67. data/app/services/uffizzi_core/container_service.rb +1 -16
  68. data/app/services/uffizzi_core/controller_service.rb +7 -1
  69. data/app/services/uffizzi_core/credential_service.rb +2 -2
  70. data/app/services/uffizzi_core/deployment_service.rb +28 -7
  71. data/app/services/uffizzi_core/github_container_registry/credential_service.rb +24 -0
  72. data/app/services/uffizzi_core/manage_activity_items_service.rb +4 -19
  73. data/app/services/uffizzi_core/repo_service.rb +2 -137
  74. data/app/services/uffizzi_core/user_generator_service.rb +78 -0
  75. data/config/locales/en.activerecord.yml +5 -0
  76. data/config/locales/en.yml +4 -1
  77. data/config/routes.rb +6 -2
  78. data/db/migrate/20220309110201_remove_secrets_from_projects.rb +7 -0
  79. data/db/migrate/20220310110150_create_project_secrets.rb +14 -0
  80. data/db/migrate/20220329123323_rename_project_secrets_to_secrets.rb +7 -0
  81. data/db/migrate/20220329124542_add_resource_to_secrets.rb +7 -0
  82. data/db/migrate/20220329143241_remove_project_ref_from_secrets.rb +7 -0
  83. data/lib/tasks/uffizzi_core_tasks.rake +5 -0
  84. data/lib/uffizzi_core/engine.rb +35 -0
  85. data/lib/uffizzi_core/version.rb +1 -1
  86. data/lib/uffizzi_core.rb +1 -30
  87. data/swagger/v1/swagger.json +220 -11
  88. metadata +45 -25
  89. data/app/clients/uffizzi_core/github/app_client.rb +0 -19
  90. data/app/clients/uffizzi_core/github/installation_client.rb +0 -11
  91. data/app/clients/uffizzi_core/github/user_client.rb +0 -51
  92. data/app/errors/uffizzi_core/compose_file/not_found_error.rb +0 -4
  93. data/app/forms/uffizzi_core/api/cli/v1/project/delete_secret_form.rb +0 -27
  94. data/app/jobs/uffizzi_core/deployment/send_github_preview_message_job.rb +0 -13
  95. data/app/services/uffizzi_core/cli/compose_file_service.rb +0 -203
  96. data/app/services/uffizzi_core/compose_file/builders/github_repo_builder_service.rb +0 -59
  97. data/app/services/uffizzi_core/compose_file/services_options/build_service.rb +0 -93
  98. data/app/services/uffizzi_core/compose_file/update_service.rb +0 -29
  99. data/app/services/uffizzi_core/github/app_service.rb +0 -51
  100. data/app/services/uffizzi_core/github/credential_service.rb +0 -124
  101. data/app/services/uffizzi_core/github/message_service.rb +0 -20
  102. data/app/services/uffizzi_core/github_service.rb +0 -28
  103. data/app/services/uffizzi_core/user_access_service.rb +0 -14
@@ -12,6 +12,43 @@
12
12
  ],
13
13
  "paths": {
14
14
  "/api/cli/v1/account/credentials": {
15
+ "get": {
16
+ "tags": [
17
+ "Account/Credential"
18
+ ],
19
+ "operationId": "Account/Credential-index",
20
+ "parameters": [
21
+ {
22
+ "name": "credential",
23
+ "description": "credential",
24
+ "required": true,
25
+ "in": "body",
26
+ "schema": {
27
+ "type": "object",
28
+ "properties": {
29
+ "username": {
30
+ "type": "string"
31
+ },
32
+ "password": {
33
+ "type": "string"
34
+ },
35
+ "type": {
36
+ "type": "string"
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ],
42
+ "responses": {
43
+ "default": {
44
+ "description": "Get a list of accounts credential"
45
+ }
46
+ },
47
+ "description": "Get a list of accounts credential",
48
+ "summary": "Get a list of accounts credential",
49
+ "x-controller": "uffizzi_core/api/cli/v1/account/credentials",
50
+ "x-action": "index"
51
+ },
15
52
  "post": {
16
53
  "tags": [
17
54
  "Account/Credential"
@@ -43,7 +80,7 @@
43
80
  "default": {
44
81
  "description": "Create account credential",
45
82
  "examples": {
46
- "application/json": "type can be one of UffizziCore::Credential::Amazon, UffizziCore::Credential::Azure, UffizziCore::Credential::DockerHub, UffizziCore::Credential::Google"
83
+ "application/json": "type can be one of UffizziCore::Credential::Amazon, UffizziCore::Credential::Azure, UffizziCore::Credential::DockerHub, UffizziCore::Credential::Google, UffizziCore::Credential::GithubContainerRegistry"
47
84
  }
48
85
  },
49
86
  "201": {
@@ -85,6 +122,49 @@
85
122
  "x-action": "create"
86
123
  }
87
124
  },
125
+ "/api/cli/v1/account/credentials/{type}/check_credential": {
126
+ "get": {
127
+ "tags": [
128
+ "Account/Credential"
129
+ ],
130
+ "operationId": "Account/Credential-check_credential",
131
+ "parameters": [
132
+ {
133
+ "name": "credential",
134
+ "description": "credential",
135
+ "required": true,
136
+ "in": "body",
137
+ "schema": {
138
+ "type": "object",
139
+ "properties": {
140
+ "type": {
141
+ "type": "string"
142
+ }
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "name": "type",
148
+ "description": "Scope response to type",
149
+ "required": true,
150
+ "in": "path",
151
+ "type": "string"
152
+ }
153
+ ],
154
+ "responses": {
155
+ "422": {
156
+ "description": "Unprocessable entity"
157
+ },
158
+ "200": {
159
+ "description": "OK"
160
+ }
161
+ },
162
+ "description": "Check if credential of the type already exists in the account",
163
+ "summary": "Check if credential of the type already exists in the account",
164
+ "x-controller": "uffizzi_core/api/cli/v1/account/credentials",
165
+ "x-action": "check_credential"
166
+ }
167
+ },
88
168
  "/api/cli/v1/account/credentials/{type}": {
89
169
  "delete": {
90
170
  "tags": [
@@ -693,6 +773,119 @@
693
773
  "x-action": "destroy"
694
774
  }
695
775
  },
776
+ "/api/cli/v1/projects/{project_slug}/deployments/{id}\"": {
777
+ "put": {
778
+ "tags": [
779
+ "Deployment"
780
+ ],
781
+ "operationId": "Deployment-update",
782
+ "parameters": [
783
+ {
784
+ "name": "id",
785
+ "description": "Scope response to id",
786
+ "required": true,
787
+ "in": "path",
788
+ "type": "string"
789
+ },
790
+ {
791
+ "name": "params",
792
+ "description": "params",
793
+ "required": true,
794
+ "in": "body",
795
+ "schema": {
796
+ "type": "object",
797
+ "properties": {
798
+ "compose_file": {
799
+ "type": "object",
800
+ "properties": {
801
+ "path": {
802
+ "type": "string"
803
+ },
804
+ "source": {
805
+ "type": "string"
806
+ },
807
+ "content": {
808
+ "type": "string"
809
+ }
810
+ }
811
+ },
812
+ "dependencies": {
813
+ "type": "array",
814
+ "items": {
815
+ "type": "object",
816
+ "properties": {
817
+ "path": {
818
+ "type": "string"
819
+ },
820
+ "source": {
821
+ "type": "string"
822
+ },
823
+ "content": {
824
+ "type": "string"
825
+ }
826
+ }
827
+ }
828
+ }
829
+ }
830
+ }
831
+ },
832
+ {
833
+ "name": "project_slug",
834
+ "description": "The project slug",
835
+ "required": true,
836
+ "in": "path",
837
+ "type": "string"
838
+ }
839
+ ],
840
+ "responses": {
841
+ "201": {
842
+ "description": "OK",
843
+ "schema": {
844
+ "$ref": "#/definitions/Deployment"
845
+ }
846
+ },
847
+ "422": {
848
+ "description": "Unprocessable Entity",
849
+ "schema": {
850
+ "type": "object",
851
+ "properties": {
852
+ "errors": {
853
+ "type": "object",
854
+ "properties": {
855
+ "state": {
856
+ "type": "string"
857
+ }
858
+ }
859
+ }
860
+ }
861
+ }
862
+ },
863
+ "404": {
864
+ "description": "Not found",
865
+ "schema": {
866
+ "type": "object",
867
+ "properties": {
868
+ "errors": {
869
+ "type": "object",
870
+ "properties": {
871
+ "title": {
872
+ "type": "string"
873
+ }
874
+ }
875
+ }
876
+ }
877
+ }
878
+ },
879
+ "401": {
880
+ "description": "Not authorized"
881
+ }
882
+ },
883
+ "description": "Update the deployment with new compose file",
884
+ "summary": "Update the deployment with new compose file",
885
+ "x-controller": "uffizzi_core/api/cli/v1/projects/deployments",
886
+ "x-action": "update"
887
+ }
888
+ },
696
889
  "/api/cli/v1/projects/{project_slug}/deployments/{id}/deploy_containers": {
697
890
  "post": {
698
891
  "tags": [
@@ -771,6 +964,14 @@
771
964
  "properties": {
772
965
  "name": {
773
966
  "type": "string"
967
+ },
968
+ "created_at": {
969
+ "type": "string",
970
+ "format": "date"
971
+ },
972
+ "updated_at": {
973
+ "type": "string",
974
+ "format": "date"
774
975
  }
775
976
  }
776
977
  }
@@ -841,6 +1042,14 @@
841
1042
  "properties": {
842
1043
  "name": {
843
1044
  "type": "string"
1045
+ },
1046
+ "created_at": {
1047
+ "type": "string",
1048
+ "format": "date"
1049
+ },
1050
+ "updated_at": {
1051
+ "type": "string",
1052
+ "format": "date"
844
1053
  }
845
1054
  }
846
1055
  }
@@ -861,7 +1070,7 @@
861
1070
  "x-action": "bulk_create"
862
1071
  }
863
1072
  },
864
- "/api/cli/v1/projects/{project_slug}/secrets/{id}": {
1073
+ "/api/cli/v1/projects/{project_slug}/secrets/{secret_name}": {
865
1074
  "delete": {
866
1075
  "tags": [
867
1076
  "Project/Secrets"
@@ -869,15 +1078,15 @@
869
1078
  "operationId": "Project/Secrets-destroy",
870
1079
  "parameters": [
871
1080
  {
872
- "name": "id",
873
- "description": "Scope response to id",
1081
+ "name": "project_slug",
1082
+ "description": "project_slug",
874
1083
  "required": true,
875
1084
  "in": "path",
876
1085
  "type": "string"
877
1086
  },
878
1087
  {
879
- "name": "project_slug",
880
- "description": "project_slug",
1088
+ "name": "secret_name",
1089
+ "description": "Scope response to secret_name",
881
1090
  "required": true,
882
1091
  "in": "path",
883
1092
  "type": "string"
@@ -890,15 +1099,15 @@
890
1099
  "$ref": "#/definitions/Project"
891
1100
  }
892
1101
  },
893
- "422": {
894
- "description": "Delete a secret from project by secret id"
1102
+ "404": {
1103
+ "description": "Delete a secret from project by secret name"
895
1104
  },
896
1105
  "401": {
897
1106
  "description": "Not authorized"
898
1107
  }
899
1108
  },
900
- "description": "Delete a secret from project by secret id",
901
- "summary": "Delete a secret from project by secret id",
1109
+ "description": "Delete a secret from project by secret name",
1110
+ "summary": "Delete a secret from project by secret name",
902
1111
  "x-controller": "uffizzi_core/api/cli/v1/projects/secrets",
903
1112
  "x-action": "destroy"
904
1113
  }
@@ -1275,4 +1484,4 @@
1275
1484
  }
1276
1485
  }
1277
1486
  }
1278
- }
1487
+ }
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
8
8
  - Grayson Adkins
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-13 00:00:00.000000000 Z
12
+ date: 2022-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm
@@ -451,6 +451,20 @@ dependencies:
451
451
  - - "~>"
452
452
  - !ruby/object:Gem::Version
453
453
  version: 3.1.7
454
+ - !ruby/object:Gem::Dependency
455
+ name: bump
456
+ requirement: !ruby/object:Gem::Requirement
457
+ requirements:
458
+ - - ">="
459
+ - !ruby/object:Gem::Version
460
+ version: '0'
461
+ type: :development
462
+ prerelease: false
463
+ version_requirements: !ruby/object:Gem::Requirement
464
+ requirements:
465
+ - - ">="
466
+ - !ruby/object:Gem::Version
467
+ version: '0'
454
468
  - !ruby/object:Gem::Dependency
455
469
  name: bundler
456
470
  requirement: !ruby/object:Gem::Requirement
@@ -661,7 +675,7 @@ dependencies:
661
675
  - - ">="
662
676
  - !ruby/object:Gem::Version
663
677
  version: '0'
664
- description: uffizzi_core
678
+ description: uffizzi-core
665
679
  email:
666
680
  - info@uffizzi.com
667
681
  executables: []
@@ -680,9 +694,8 @@ files:
680
694
  - app/clients/uffizzi_core/controller_client/request_result.rb
681
695
  - app/clients/uffizzi_core/docker_hub_client.rb
682
696
  - app/clients/uffizzi_core/docker_hub_client/request_result.rb
683
- - app/clients/uffizzi_core/github/app_client.rb
684
- - app/clients/uffizzi_core/github/installation_client.rb
685
- - app/clients/uffizzi_core/github/user_client.rb
697
+ - app/clients/uffizzi_core/github_container_registry_client.rb
698
+ - app/clients/uffizzi_core/github_container_registry_client/request_result.rb
686
699
  - app/clients/uffizzi_core/google_registry_client.rb
687
700
  - app/clients/uffizzi_core/google_registry_client/request_result.rb
688
701
  - app/contexts/uffizzi_core/base_context.rb
@@ -709,10 +722,11 @@ files:
709
722
  - app/controllers/uffizzi_core/application_controller.rb
710
723
  - app/errors/uffizzi_core/compose_file/build_error.rb
711
724
  - app/errors/uffizzi_core/compose_file/credential_error.rb
712
- - app/errors/uffizzi_core/compose_file/not_found_error.rb
713
725
  - app/errors/uffizzi_core/compose_file/parse_error.rb
714
726
  - app/errors/uffizzi_core/compose_file/secrets_error.rb
727
+ - app/errors/uffizzi_core/deployment/image_pull_error.rb
715
728
  - app/errors/uffizzi_core/deployment_not_found_error.rb
729
+ - app/forms/uffizzi_core/api/cli/v1/account/credential/check_credential_form.rb
716
730
  - app/forms/uffizzi_core/api/cli/v1/account/credential/create_form.rb
717
731
  - app/forms/uffizzi_core/api/cli/v1/compose_file/check_credentials_form.rb
718
732
  - app/forms/uffizzi_core/api/cli/v1/compose_file/cli_form.rb
@@ -721,8 +735,9 @@ files:
721
735
  - app/forms/uffizzi_core/api/cli/v1/compose_file/update_form.rb
722
736
  - app/forms/uffizzi_core/api/cli/v1/config_file/create_form.rb
723
737
  - app/forms/uffizzi_core/api/cli/v1/deployment/create_form.rb
724
- - app/forms/uffizzi_core/api/cli/v1/project/delete_secret_form.rb
738
+ - app/forms/uffizzi_core/api/cli/v1/deployment/update_form.rb
725
739
  - app/forms/uffizzi_core/api/cli/v1/project/update_form.rb
740
+ - app/forms/uffizzi_core/api/cli/v1/secret/bulk_assign_form.rb
726
741
  - app/forms/uffizzi_core/api/cli/v1/session_create_form.rb
727
742
  - app/forms/uffizzi_core/api/cli/v1/template/create_form.rb
728
743
  - app/forms/uffizzi_core/application_form.rb
@@ -742,7 +757,6 @@ files:
742
757
  - app/jobs/uffizzi_core/deployment/delete_job.rb
743
758
  - app/jobs/uffizzi_core/deployment/deploy_containers_job.rb
744
759
  - app/jobs/uffizzi_core/deployment/manage_deploy_activity_item_job.rb
745
- - app/jobs/uffizzi_core/deployment/send_github_preview_message_job.rb
746
760
  - app/lib/uffizzi_core/rbac/user_access_service.rb
747
761
  - app/mailers/uffizzi_core/application_mailer.rb
748
762
  - app/models/concerns/uffizzi_core/hashid_concern.rb
@@ -766,6 +780,7 @@ files:
766
780
  - app/models/uffizzi_core/credential/azure.rb
767
781
  - app/models/uffizzi_core/credential/docker_hub.rb
768
782
  - app/models/uffizzi_core/credential/github.rb
783
+ - app/models/uffizzi_core/credential/github_container_registry.rb
769
784
  - app/models/uffizzi_core/credential/google.rb
770
785
  - app/models/uffizzi_core/database.rb
771
786
  - app/models/uffizzi_core/database_offering.rb
@@ -783,8 +798,10 @@ files:
783
798
  - app/models/uffizzi_core/repo/azure.rb
784
799
  - app/models/uffizzi_core/repo/docker_hub.rb
785
800
  - app/models/uffizzi_core/repo/github.rb
801
+ - app/models/uffizzi_core/repo/github_container_registry.rb
786
802
  - app/models/uffizzi_core/repo/google.rb
787
803
  - app/models/uffizzi_core/role.rb
804
+ - app/models/uffizzi_core/secret.rb
788
805
  - app/models/uffizzi_core/template.rb
789
806
  - app/models/uffizzi_core/user.rb
790
807
  - app/models/uffizzi_core/user_project.rb
@@ -826,23 +843,25 @@ files:
826
843
  - app/serializers/uffizzi_core/api/cli/v1/projects/deployments/container_serializer.rb
827
844
  - app/serializers/uffizzi_core/api/cli/v1/projects/deployments/container_serializer/container_config_file_serializer.rb
828
845
  - app/serializers/uffizzi_core/api/cli/v1/projects/deployments/container_serializer/container_config_file_serializer/config_file_serializer.rb
846
+ - app/serializers/uffizzi_core/api/cli/v1/projects/secret_serializer.rb
829
847
  - app/serializers/uffizzi_core/api/cli/v1/user_serializer.rb
830
848
  - app/serializers/uffizzi_core/api/cli/v1/user_serializer/account_serializer.rb
831
849
  - app/serializers/uffizzi_core/base_serializer.rb
850
+ - app/serializers/uffizzi_core/controller/apply_config_file/config_file_serializer.rb
832
851
  - app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb
833
852
  - app/serializers/uffizzi_core/controller/create_deployment/deployment_serializer.rb
834
853
  - app/serializers/uffizzi_core/controller/deploy_containers/container_serializer.rb
854
+ - app/serializers/uffizzi_core/controller/deploy_containers/container_serializer/container_config_file_serializer.rb
855
+ - app/serializers/uffizzi_core/controller/deploy_containers/container_serializer/container_config_file_serializer/config_file_serializer.rb
835
856
  - app/serializers/uffizzi_core/controller/deploy_containers/credential_serializer.rb
836
857
  - app/services/uffizzi_core/account_service.rb
837
858
  - app/services/uffizzi_core/activity_item_service.rb
838
859
  - app/services/uffizzi_core/amazon/credential_service.rb
839
860
  - app/services/uffizzi_core/amazon_service.rb
840
861
  - app/services/uffizzi_core/azure/credential_service.rb
841
- - app/services/uffizzi_core/cli/compose_file_service.rb
842
862
  - app/services/uffizzi_core/compose_file/builders/config_files_builder_service.rb
843
863
  - app/services/uffizzi_core/compose_file/builders/container_builder_service.rb
844
864
  - app/services/uffizzi_core/compose_file/builders/docker_repo_builder_service.rb
845
- - app/services/uffizzi_core/compose_file/builders/github_repo_builder_service.rb
846
865
  - app/services/uffizzi_core/compose_file/builders/template_builder_service.rb
847
866
  - app/services/uffizzi_core/compose_file/builders/variables_builder_service.rb
848
867
  - app/services/uffizzi_core/compose_file/config_files_service.rb
@@ -855,7 +874,6 @@ files:
855
874
  - app/services/uffizzi_core/compose_file/github_dependencies_service.rb
856
875
  - app/services/uffizzi_core/compose_file/ingress_options_service.rb
857
876
  - app/services/uffizzi_core/compose_file/secrets_options_service.rb
858
- - app/services/uffizzi_core/compose_file/services_options/build_service.rb
859
877
  - app/services/uffizzi_core/compose_file/services_options/command_service.rb
860
878
  - app/services/uffizzi_core/compose_file/services_options/configs_service.rb
861
879
  - app/services/uffizzi_core/compose_file/services_options/deploy_service.rb
@@ -866,7 +884,6 @@ files:
866
884
  - app/services/uffizzi_core/compose_file/services_options/secrets_service.rb
867
885
  - app/services/uffizzi_core/compose_file/services_options_service.rb
868
886
  - app/services/uffizzi_core/compose_file/template_service.rb
869
- - app/services/uffizzi_core/compose_file/update_service.rb
870
887
  - app/services/uffizzi_core/compose_file/variables_service.rb
871
888
  - app/services/uffizzi_core/compose_file_service.rb
872
889
  - app/services/uffizzi_core/container_service.rb
@@ -875,10 +892,7 @@ files:
875
892
  - app/services/uffizzi_core/deployment_service.rb
876
893
  - app/services/uffizzi_core/docker_hub/credential_service.rb
877
894
  - app/services/uffizzi_core/docker_hub_service.rb
878
- - app/services/uffizzi_core/github/app_service.rb
879
- - app/services/uffizzi_core/github/credential_service.rb
880
- - app/services/uffizzi_core/github/message_service.rb
881
- - app/services/uffizzi_core/github_service.rb
895
+ - app/services/uffizzi_core/github_container_registry/credential_service.rb
882
896
  - app/services/uffizzi_core/google/credential_service.rb
883
897
  - app/services/uffizzi_core/logs_service.rb
884
898
  - app/services/uffizzi_core/manage_activity_items_service.rb
@@ -887,7 +901,7 @@ files:
887
901
  - app/services/uffizzi_core/response_service.rb
888
902
  - app/services/uffizzi_core/template_service.rb
889
903
  - app/services/uffizzi_core/token_service.rb
890
- - app/services/uffizzi_core/user_access_service.rb
904
+ - app/services/uffizzi_core/user_generator_service.rb
891
905
  - app/utils/uffizzi_core/converters.rb
892
906
  - app/validators/uffizzi_core/email_validator.rb
893
907
  - app/validators/uffizzi_core/environment_variable_list_validator.rb
@@ -899,7 +913,12 @@ files:
899
913
  - config/locales/en.yml
900
914
  - config/routes.rb
901
915
  - db/migrate/20220218121438_create_uffizzi_core_tables.rb
916
+ - db/migrate/20220309110201_remove_secrets_from_projects.rb
917
+ - db/migrate/20220310110150_create_project_secrets.rb
902
918
  - db/migrate/20220325113342_add_name_to_uffizzi_containers.rb
919
+ - db/migrate/20220329123323_rename_project_secrets_to_secrets.rb
920
+ - db/migrate/20220329124542_add_resource_to_secrets.rb
921
+ - db/migrate/20220329143241_remove_project_ref_from_secrets.rb
903
922
  - db/seeds.rb
904
923
  - lib/tasks/uffizzi_core_tasks.rake
905
924
  - lib/uffizzi_core.rb
@@ -911,9 +930,9 @@ licenses:
911
930
  - Apache-2.0
912
931
  metadata:
913
932
  homepage_uri: https://uffizzi.com
914
- source_code_uri: https://github.com/UffizziCloud/uffizzi_app/tree/main/core
915
- changelog_uri: https://github.com/UffizziCloud/uffizzi_app/blob/main/core/CHANGELOG.md
916
- post_install_message:
933
+ source_code_uri: https://github.com/UffizziCloud/uffizzi_core
934
+ changelog_uri: https://github.com/UffizziCloud/uffizzi_core/blob/master/CHANGELOG.md
935
+ post_install_message:
917
936
  rdoc_options: []
918
937
  require_paths:
919
938
  - lib
@@ -928,8 +947,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
928
947
  - !ruby/object:Gem::Version
929
948
  version: '0'
930
949
  requirements: []
931
- rubygems_version: 3.2.22
932
- signing_key:
950
+ rubyforge_project:
951
+ rubygems_version: 2.7.3
952
+ signing_key:
933
953
  specification_version: 4
934
- summary: uffizzi_core
954
+ summary: uffizzi-core
935
955
  test_files: []
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::Github::AppClient
4
- def initialize(jwt_token)
5
- @client = Octokit::Client.new(bearer_token: jwt_token)
6
- end
7
-
8
- def delete_installation(installation_id)
9
- @client.delete_installation(installation_id)
10
- end
11
-
12
- def create_app_installation_access_token(installation_id)
13
- @client.create_app_installation_access_token(installation_id)
14
- end
15
-
16
- def installation(installation_id)
17
- @client.installation(installation_id)
18
- end
19
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::Github::InstallationClient
4
- def initialize(access_token)
5
- @client = Octokit::Client.new(access_token: access_token)
6
- end
7
-
8
- def add_comment(repository, issue_id, message)
9
- @client.add_comment(repository, issue_id, message)
10
- end
11
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::Github::UserClient
4
- PER_PAGE = 100
5
-
6
- def initialize(access_token, per_page = PER_PAGE)
7
- @client = Octokit::Client.new(access_token: access_token, per_page: per_page)
8
- end
9
-
10
- def contents?(repository_id, params)
11
- @client.contents?(repository_id, params)
12
- end
13
-
14
- def contents(repository_id, options)
15
- @client.contents(repository_id, options)
16
- end
17
-
18
- def user_installations
19
- response = @client.find_user_installations
20
-
21
- response[:installations]
22
- end
23
-
24
- def installation_repositories(installation_id, repo_attributes)
25
- response = @client.find_installation_repositories_for_user(installation_id, repo_attributes)
26
-
27
- response[:repositories]
28
- end
29
-
30
- def branch(repository_id, branch)
31
- @client.branch(repository_id, branch)
32
- end
33
-
34
- def commit(repository_id, commit_sha)
35
- response = @client.commit(repository_id, commit_sha)
36
-
37
- response[:commit]
38
- end
39
-
40
- def branches(repository_id)
41
- @client.branches(repository_id)
42
- end
43
-
44
- def repo(repository_id)
45
- @client.repo(repository_id)
46
- end
47
-
48
- def search_repositories(query)
49
- @client.search_repositories(query)
50
- end
51
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::ComposeFile::NotFoundError < StandardError
4
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::Api::Cli::V1::Project::DeleteSecretForm < UffizziCore::Project
4
- include UffizziCore::ApplicationForm
5
-
6
- attr_accessor :secret
7
-
8
- permit secrets: [:name, :value]
9
-
10
- validate :check_existence
11
-
12
- def delete_secret!
13
- existing_secrets = secrets.presence || []
14
-
15
- self.secrets = existing_secrets.reject { |existing_secret| existing_secret['name'] == secret.name }
16
- end
17
-
18
- private
19
-
20
- def check_existence
21
- existing_secrets = secrets.presence || []
22
-
23
- detected_secret = existing_secrets.detect { |existing_secret| existing_secret['name'] == secret.name }
24
-
25
- errors.add(:secret, :not_found, name: secret.name) if detected_secret.nil?
26
- end
27
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class UffizziCore::Deployment::SendGithubPreviewMessageJob < UffizziCore::ApplicationJob
4
- sidekiq_options queue: :deployments, retry: 5
5
-
6
- def perform(deployment_id)
7
- Rails.logger.info("DEPLOYMENT_PROCESS deployment_id=#{deployment_id} SendGithubPreviewMessageJob")
8
-
9
- deployment = UffizziCore::Deployment.find(deployment_id)
10
-
11
- UffizziCore::GithubService.send_preview_message(deployment)
12
- end
13
- end