Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Send webhook data(source value and source type) in pipeline api response #3120

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

prakash100198
Copy link
Contributor

@prakash100198 prakash100198 commented Mar 15, 2023

Description

For each particular artifact card shown in Select Image and Rollback section, now we are going to show form which git branch and repo the artifact was prepared.
Fixes #AD2220

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested by deploying on vm, test cases:-
  1. Make a workflow with cd configured, now click on Select Image/ Rollback the api response, previously the source type and source value was not coming from the backend, but after the fix the source type and source value is also coming, for a particular cd-pipeline artifact.
  2. Tested by looking into api response of diff cd-workflows configured from diff branches, the source type and value data coming in case of webhook data as correct.

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?


@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 0 Code Smells

No Coverage information No Coverage information
10.7% 10.7% Duplication

Id int `json:"id"`
Image string `json:"image,notnull"`
ImageDigest string `json:"image_digest,notnull"`
MaterialInfo json.RawMessage `json:"material_info"` //git material metadata json array string
Copy link
Contributor

Choose a reason for hiding this comment

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

is this work correctly, we can use map

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's working fine, also it's previous code

@@ -182,6 +182,7 @@ type PipelineBuilderImpl struct {
helmAppService client.HelmAppService
deploymentGroupRepository repository.DeploymentGroupRepository
ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository
ciWorkflowRepository pipelineConfig.CiWorkflowRepository
//ciTemplateOverrideRepository pipelineConfig.CiTemplateOverrideRepository
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this commented code

@prakash100198 prakash100198 merged commit f59cd67 into main Mar 16, 2023
@prakash100198 prakash100198 deleted the webhook-data-in-pipeline-api-response branch March 16, 2023 12:38
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.

2 participants