Skip to content

Commit

Permalink
add more info in log when pipeline is found or not found
Browse files Browse the repository at this point in the history
Signed-off-by: Ricky Hariady <ricky.hariady@tech.jago.com>
  • Loading branch information
rhariady committed Jan 22, 2025
1 parent 4636a84 commit 6cfdc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/events/vcs/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,13 @@ func (g *GitlabClient) UpdateStatus(logger logging.SimpleLogging, repo models.Re
return err
}
if len(commitStatuses) > 0 {
logger.Info("Pipeline found for commit %s, setting pipeline ID to %d", pull.HeadCommit, commitStatuses[0].PipelineId)
logger.Info("Pipeline found for commit %s and ref %s, setting pipeline ID to %d", pull.HeadCommit, pull.HeadBranch, commitStatuses[0].PipelineId)
// Set the pipeline ID to the last pipeline that ran for the commit
setCommitStatusOptions.PipelineID = gitlab.Ptr(commitStatuses[0].PipelineId)
break
}
if i != retries {
logger.Info("No pipeline found for commit %s, retrying in %s", pull.HeadCommit, delay)
logger.Info("No pipeline found for commit %s and ref %s, retrying in %s", pull.HeadCommit, pull.HeadBranch, delay)
time.Sleep(delay)
} else {
// If we've exhausted all retries, set the Ref to the branch name
Expand Down

0 comments on commit 6cfdc38

Please sign in to comment.