Skip to content

Commit

Permalink
[#377] Delete old fields
Browse files Browse the repository at this point in the history
  • Loading branch information
antlu committed Feb 8, 2023
1 parent e16560d commit a138d61
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class UffizziCore::Api::Cli::V1::Deployment::CreateForm < UffizziCore::Deploymen
:kind,
:dockerfile_path,
:dockerfile_context_path,
:deploy_preview_when_pull_request_is_opened,
:delete_preview_when_pull_request_is_closed,
:deploy_preview_when_image_tag_is_created,
:delete_preview_when_image_tag_is_updated,
:share_to_github,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class UffizziCore::Api::Cli::V1::Deployment::UpdateForm < UffizziCore::Deploymen
:kind,
:dockerfile_path,
:dockerfile_context_path,
:deploy_preview_when_pull_request_is_opened,
:delete_preview_when_pull_request_is_closed,
:deploy_preview_when_image_tag_is_created,
:delete_preview_when_image_tag_is_updated,
:share_to_github,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ def build_repo_attributes(container_data)

def set_continuous_preview_attributes_to_repo(repo_attributes, global_data, container_data)
condition_attributes = [
:deploy_preview_when_pull_request_is_opened,
:delete_preview_when_pull_request_is_closed,
:deploy_preview_when_image_tag_is_created,
:delete_preview_when_image_tag_is_updated,
:share_to_github,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ def parse(continuous_preview_data)
return {} if continuous_preview_data.nil?

{
deploy_preview_when_pull_request_is_opened: trigger_value(continuous_preview_data, 'deploy_preview_when_pull_request_is_opened'),
delete_preview_when_pull_request_is_closed: trigger_value(continuous_preview_data, 'delete_preview_when_pull_request_is_closed'),
deploy_preview_when_image_tag_is_created: trigger_value(continuous_preview_data, 'deploy_preview_when_image_tag_is_created'),
delete_preview_when_image_tag_is_updated: trigger_value(continuous_preview_data, 'delete_preview_when_image_tag_is_updated'),
delete_preview_after: delete_preview_after_value(continuous_preview_data['delete_preview_after']),
Expand Down
2 changes: 0 additions & 2 deletions core/test/factories/repos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
branch
description
repository_id { generate(:number) }
deploy_preview_when_pull_request_is_opened { false }
delete_preview_when_pull_request_is_closed { false }
deploy_preview_when_image_tag_is_created { false }
delete_preview_when_image_tag_is_updated { false }
delete_preview_after { nil }
Expand Down
18 changes: 8 additions & 10 deletions uffizzi-compose-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ services:
context: https://github.com/UffizziCloud/example-voting-result:main
dockerfile: Dockerfile

continuous_preview:
deploy_preview_when_pull_request_is_opened: false
delete_preview_when_pull_request_is_closed: false
deploy_preview_for_image_tag_PR_#-branchname: true
delete_preview_when_pull_request_is_closed: false
delete_preview_in_x_hours: 24
share_to_github: true
x-uffizzi:
continuous_preview:
deploy_preview_when_image_tag_is_created: true
delete_preview_after: 24
share_to_github: true

ingress:
service: nginx
port: 8080
ingress:
service: nginx
port: 8080

0 comments on commit a138d61

Please sign in to comment.