Skip to content

Commit

Permalink
Merge pull request #385 from rcerven/fixpanic
Browse files Browse the repository at this point in the history
move ensureIncomingSecret call after checking that repository actually
  • Loading branch information
rcerven authored Dec 16, 2024
2 parents da65d94 + 02faba3 commit 499dc0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controllers/component_build_controller_pac.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ func (r *ComponentBuildReconciler) TriggerPaCBuild(ctx context.Context, componen
log := ctrllog.FromContext(ctx).WithName("TriggerPaCBuild")
ctx = ctrllog.IntoContext(ctx, log)

incomingSecret, reconcileRequired, err := r.ensureIncomingSecret(ctx, component)
if err != nil {
return false, err
}

repository, err := r.findPaCRepositoryForComponent(ctx, component)
if err != nil {
return false, err
Expand All @@ -230,6 +225,11 @@ func (r *ComponentBuildReconciler) TriggerPaCBuild(ctx context.Context, componen
return false, fmt.Errorf("PaC repository not found for component %s", component.Name)
}

incomingSecret, reconcileRequired, err := r.ensureIncomingSecret(ctx, component)
if err != nil {
return false, err
}

repoUrl := component.Spec.Source.GitSource.URL
gitProvider, err := getGitProvider(*component)
if err != nil {
Expand Down

0 comments on commit 499dc0b

Please sign in to comment.