Skip to content

Conversation

@iamayushm
Copy link
Contributor

@iamayushm iamayushm commented Jul 10, 2023

Description

Fixes # 3615

How Has This Been Tested?

  1. If gitOps or Helm Option is enabled from UI :-
    a) only allowed env can be selected
  2. If option is disabled :-
    a) If gitOps is not allowed, app is deployed through helm
    b) If gitOps is allowed and configured, app is deployed using gitOps
    c) If gitOps is allowed and not configured, app is deployed using helm
  3. In app clone, new app is created with allowed deployment app type for that environment and not of actual deployment app type

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@iamayushm iamayushm changed the title fix: enforcing deployment type in environment enhancement: enforcing deployment type in environment Jul 12, 2023
API_SECRET_KEY string = "apiTokenSecret"
HostUrlKey string = "url"
API_SECRET_KEY string = "apiTokenSecret"
DEPLOYMENT_APP_TYPE_ALLOWED_CONFIG string = "deploymentAppTypeAllowedConfig"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace to enforceDeploymentTypeConfig

isGitOpsConfigured := true
pipelineBuilderService.SetPipelineDeploymentAppType(pipelineCreateRequest, isGitOpsConfigured)
deploymentConfig := make(map[string]bool)
deploymentConfig["argo_cd"] = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use constants

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
42.4% 42.4% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@iamayushm iamayushm merged commit bd37887 into main Jul 12, 2023
@iamayushm iamayushm deleted the app_clone_fix branch July 12, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants