Skip to content

Commit

Permalink
Adds logs for new commit or error checking for the latest
Browse files Browse the repository at this point in the history
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
  • Loading branch information
0xavi0 committed Jan 7, 2025
1 parent c41a446 commit fd2fc98
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ func (r *GitJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
repoPolled, err := r.repoPolled(ctx, gitrepo)
if err != nil {
r.Recorder.Event(gitrepo, fleetevent.Warning, "FailedToCheckCommit", err.Error())
logger.V(1).Info("Failed to check for latest commit", "error", err)
} else if repoPolled && oldCommit != gitrepo.Status.Commit {
r.Recorder.Event(gitrepo, fleetevent.Normal, "GotNewCommit", gitrepo.Status.Commit)
logger.V(1).Info("New commit from repository", "commit", gitrepo.Status.Commit)
}

// check for webhook commit
Expand Down

0 comments on commit fd2fc98

Please # to comment.