uffizzi_core 2.0.21 → 2.0.22
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08a1d3dd5708644d6bba67a98257a03a6007631da8048c00442323d8ea14e454'
|
4
|
+
data.tar.gz: e91bd6898142124fcfd59a0ad794194db54085a22f67731fbb8e152e20790ab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeee8c6d59619b064c2ac94035abcdb931bbfde55151f65725b564118fef2cdceaa5db128df4badf362fcee5073fdc53e62541ba974c36fddc504e8ac9c7f431
|
7
|
+
data.tar.gz: a213dc22b1f17b9cb1d3df69b6dba1d9b860dbf7cd0acc7be21789eef1d5b0d8e799306ec2684cbf27f070fe04747260bf25f3636ce06bf16c0747b6fe582f56
|
@@ -57,7 +57,12 @@ class UffizziCore::Api::Cli::V1::Projects::DeploymentsController < UffizziCore::
|
|
57
57
|
errors = check_credentials(compose_file)
|
58
58
|
return render_errors(errors) if errors.present?
|
59
59
|
|
60
|
-
|
60
|
+
params = {
|
61
|
+
metadata: metadata_params,
|
62
|
+
creation_source: creation_source_params,
|
63
|
+
}
|
64
|
+
|
65
|
+
deployment = UffizziCore::DeploymentService.create_from_compose(compose_file, resource_project, current_user, params)
|
61
66
|
|
62
67
|
respond_with deployment
|
63
68
|
end
|
@@ -182,6 +187,10 @@ class UffizziCore::Api::Cli::V1::Projects::DeploymentsController < UffizziCore::
|
|
182
187
|
params[:metadata]
|
183
188
|
end
|
184
189
|
|
190
|
+
def creation_source_params
|
191
|
+
params[:creation_source]
|
192
|
+
end
|
193
|
+
|
185
194
|
def render_invalid_file
|
186
195
|
render json: { errors: { state: ['Invalid compose file'] } }, status: :unprocessable_entity
|
187
196
|
end
|
@@ -12,13 +12,13 @@ class UffizziCore::DeploymentService
|
|
12
12
|
}.freeze
|
13
13
|
|
14
14
|
class << self
|
15
|
-
def create_from_compose(compose_file, project, user,
|
15
|
+
def create_from_compose(compose_file, project, user, params)
|
16
16
|
deployment_attributes = ActionController::Parameters.new(compose_file.template.payload)
|
17
17
|
deployment_form = UffizziCore::Api::Cli::V1::Deployment::CreateForm.new(deployment_attributes)
|
18
18
|
deployment_form.assign_dependences!(project, user)
|
19
19
|
deployment_form.compose_file = compose_file
|
20
|
-
deployment_form.creation_source = UffizziCore::Deployment.creation_source.compose_file_manual
|
21
|
-
deployment_form.metadata = metadata || {}
|
20
|
+
deployment_form.creation_source = params[:creation_source] || UffizziCore::Deployment.creation_source.compose_file_manual
|
21
|
+
deployment_form.metadata = params[:metadata] || {}
|
22
22
|
|
23
23
|
run_deployment_creation_tasks(deployment_form) if deployment_form.save
|
24
24
|
|
data/lib/uffizzi_core/version.rb
CHANGED
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.0.
|
4
|
+
version: 2.0.22
|
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-01-
|
12
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aasm
|