Skip to content

Commit c0941bc

Browse files
chore: reporter code splitting (#316)
* v2 reporter: code splitting into different files * v2 reporter: changes after pr review * Makefile: fixed wrong IMAGE_NAMESPACE
1 parent 961fd91 commit c0941bc

14 files changed

+910
-830
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ PATH:=$(PATH):$(PWD)/hack
145145

146146
# docker image publishing options
147147
DOCKER_PUSH?=false
148-
IMAGE_NAMESPACE?=xeonalex/personal-argocd-dev
148+
IMAGE_NAMESPACE?=quay.io/codefresh
149149
# perform static compilation
150150
STATIC_BUILD?=true
151151
# build development images
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package reporter
2+
3+
import (
4+
"context"
5+
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
6+
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
7+
)
8+
9+
func (s *applicationEventReporter) getApplicationRevisionDetails(ctx context.Context, a *appv1.Application, revision string) (*appv1.RevisionMetadata, error) {
10+
project := a.Spec.GetProject()
11+
return s.applicationServiceClient.RevisionMetadata(ctx, &application.RevisionMetadataQuery{
12+
Name: &a.Name,
13+
AppNamespace: &a.Namespace,
14+
Revision: &revision,
15+
Project: &project,
16+
})
17+
}

0 commit comments

Comments
 (0)