Skip to content

Commit

Permalink
chore: reporter code splitting (#316)
Browse files Browse the repository at this point in the history
* v2 reporter: code splitting into different files

* v2 reporter: changes after pr review

* Makefile: fixed wrong IMAGE_NAMESPACE
  • Loading branch information
oleksandr-codefresh authored Jul 3, 2024
1 parent 961fd91 commit c0941bc
Show file tree
Hide file tree
Showing 14 changed files with 910 additions and 830 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ PATH:=$(PATH):$(PWD)/hack

# docker image publishing options
DOCKER_PUSH?=false
IMAGE_NAMESPACE?=xeonalex/personal-argocd-dev
IMAGE_NAMESPACE?=quay.io/codefresh
# perform static compilation
STATIC_BUILD?=true
# build development images
Expand Down
17 changes: 17 additions & 0 deletions event_reporter/reporter/app_revision.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package reporter

import (
"context"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)

func (s *applicationEventReporter) getApplicationRevisionDetails(ctx context.Context, a *appv1.Application, revision string) (*appv1.RevisionMetadata, error) {
project := a.Spec.GetProject()
return s.applicationServiceClient.RevisionMetadata(ctx, &application.RevisionMetadataQuery{
Name: &a.Name,
AppNamespace: &a.Namespace,
Revision: &revision,
Project: &project,
})
}
Loading

0 comments on commit c0941bc

Please sign in to comment.