Skip to content

Conversation

@fghanmi
Copy link
Member

@fghanmi fghanmi commented Nov 6, 2025

Summary by Sourcery

Add configuration for the ctlog-monitor component alongside updates to the existing rekor-monitor pipelines, including Dockerfile renaming and trigger refinements

New Features:

  • Add Tekton PipelineRun definitions for the new ctlog-monitor component on pull requests and pushes
  • Introduce Dockerfile.ctlog-monitor.rh for building the ctlog-monitor component

Enhancements:

  • Rename Dockerfile.rh to Dockerfile.rekor-monitor.rh in rekor-monitor pipeline configurations
  • Refine path-based triggers in rekor-monitor pipelines to only include rekor-monitor-related files

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 6, 2025

Reviewer's Guide

This PR refactors the rekor-monitor Tekton pipelines by renaming its Dockerfile and adjusting trigger expressions, and introduces a new ctlog-monitor component with dedicated pull-request and push pipelines plus its Dockerfile.

Flow diagram for ctlog-monitor pipeline triggers

flowchart TD
  PR["Pull Request Event"] --> CELPR["CEL Expression (ctlog-monitor-pull-request.yaml)"]
  CELPR -->|if matched| CMPR["ctlog-monitor-pull-request PipelineRun"]
  PUSH["Push Event"] --> CELPU["CEL Expression (ctlog-monitor-push.yaml)"]
  CELPU -->|if matched| CMPU["ctlog-monitor-push PipelineRun"]
  CMPR --> CMDF["Dockerfile.ctlog-monitor.rh"]
  CMPU --> CMDF
  CMPR -->|builds| IMGPR["quay.io/securesign/ctlog-monitor:on-pr-{{revision}}"]
  CMPU -->|builds| IMGPU["quay.io/securesign/ctlog-monitor:{{revision}}"]
Loading

File-Level Changes

Change Details Files
Rename and update rekor-monitor pipeline definitions
  • Renamed Dockerfile.rh to Dockerfile.rekor-monitor.rh in pull-request and push pipelines
  • Updated on-cel-expressions to watch the new Dockerfile and removed ct_monitor path triggers
  • Adjusted pipeline parameter values to reference Dockerfile.rekor-monitor.rh
.tekton/rekor-monitor-pull-request.yaml
.tekton/rekor-monitor-push.yaml
Add ctlog-monitor Tekton pipeline configurations
  • Created pull-request pipeline yaml with annotations, labels, params, and serviceAccount
  • Created push pipeline yaml with annotations, labels, params, and empty taskRunTemplate
  • Configured triggers to respond to changes in Dockerfile.ctlog-monitor.rh, code, and dependencies
.tekton/ctlog-monitor-pull-request.yaml
.tekton/ctlog-monitor-push.yaml
Introduce Dockerfile for ctlog-monitor
  • Added Dockerfile.ctlog-monitor.rh to build the ctlog-monitor component
Dockerfile.ctlog-monitor.rh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The Tekton YAML for both ctlog-monitor and rekor-monitor pipelines share almost identical on-cel-expression trigger lists—consider extracting or templating this common logic to reduce duplication and drift.
  • The new ctlog-monitor component uses mixed naming conventions (hyphens in Dockerfile and pipeline names vs underscores in cmd/ct_monitor), so aligning these will avoid confusion and ensure consistency across the repo.
  • In ctlog-monitor-push.yaml, the taskRunTemplate is empty while the pull-request pipeline specifies a service account—verify this is intentional or add the appropriate serviceAccountName for consistent permissions.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Tekton YAML for both `ctlog-monitor` and `rekor-monitor` pipelines share almost identical on-cel-expression trigger lists—consider extracting or templating this common logic to reduce duplication and drift.
- The new `ctlog-monitor` component uses mixed naming conventions (hyphens in Dockerfile and pipeline names vs underscores in `cmd/ct_monitor`), so aligning these will avoid confusion and ensure consistency across the repo.
- In `ctlog-monitor-push.yaml`, the `taskRunTemplate` is empty while the pull-request pipeline specifies a service account—verify this is intentional or add the appropriate serviceAccountName for consistent permissions.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant