Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ci regex matching clean up and docker workflow update #3908

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

MSevey
Copy link
Member

@MSevey MSevey commented Sep 25, 2024

Overview

This PR adds the required input for the using the docker workflow when manually triggered.

This PR also updates the regex matching to a more general wildcard regex for more flexibility in the future to avoid issues like images not being built due to adding arabica to the tag.

@MSevey MSevey requested a review from a team as a code owner September 25, 2024 13:46
@MSevey MSevey requested review from rootulp and staheri14 and removed request for a team September 25, 2024 13:46
Copy link
Contributor

coderabbitai bot commented Sep 25, 2024

📝 Walkthrough

Walkthrough

The changes involve modifications to the CI workflow files in the .github/workflows directory. These modifications primarily simplify the branch and tag patterns for triggering workflows by replacing specific regex patterns with a more general wildcard pattern (v*). Additionally, new input parameters have been introduced in the Docker build and publish workflow to enhance reference handling.

Changes

File Path Change Summary
.github/workflows/ci-release.yml Simplified branch and tag patterns to v*.
.github/workflows/codeql.yml Updated branch filter to v* and reformatted cron schedule syntax; no functional changes.
.github/workflows/docker-build-publish.yml Simplified branch and tag patterns to v* and added checkout_ref input parameter to job configs.

Possibly related PRs

  • feat: build on network tags and manual dispatch #3905: The changes in this PR also modify the .github/workflows/docker-build-publish.yml file, specifically updating tag patterns and adding a new input parameter, which relates to the general pattern changes made in the main PR.

Suggested labels

external

Suggested reviewers

  • evan-forbes
  • rootulp

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e24c0e8 and 496c6d5.

📒 Files selected for processing (3)
  • .github/workflows/ci-release.yml (1 hunks)
  • .github/workflows/codeql.yml (4 hunks)
  • .github/workflows/docker-build-publish.yml (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/codeql.yml
🔇 Additional comments not posted (6)
.github/workflows/ci-release.yml (3)

11-11: Tag pattern updated to use wildcard

The tag pattern has been updated to use a more general wildcard regex "v*". This change is in line with the PR objective and should prevent issues with building images for specific tags like 'arabica'.

Let's verify if this change affects any other parts of the workflow:

#!/bin/bash
# Description: Check if the new tag pattern is used consistently across the workflow

# Test: Search for other tag patterns in the file
rg --type yaml 'tags:' .github/workflows/ci-release.yml -A 5

Line range hint 1-30: Docker workflow update not found in this file

The PR objectives mention updating the Docker workflow with necessary input parameters for manual triggering. However, these changes are not present in this file.

Let's check if there are any Docker-related workflows in the repository:

#!/bin/bash
# Description: Search for Docker-related workflow files

# Test: Look for workflow files that might contain Docker-related content
fd -e yml -e yaml . .github/workflows | xargs rg --type yaml -l 'docker|image|container'

If the Docker workflow update is missing, would you like me to help create a new workflow file or update an existing one to include the necessary input parameters for manual triggering?


9-9: Branch pattern updated to use wildcard

The branch pattern has been updated to use a more general wildcard regex "v*". This change aligns with the PR objective of implementing a more flexible pattern for future developments.

Let's verify if this change affects any other parts of the workflow:

.github/workflows/docker-build-publish.yml (3)

8-8: Simplified branch pattern improves flexibility

The change from specific version patterns to the more general "v*" pattern is a good improvement. This simplification aligns with the PR objective of implementing a more general wildcard regex. It will match all version branches while reducing maintenance overhead for updating specific version patterns in the future.


10-10: Generalized tag pattern addresses PR objective

The change to a more general "v*" pattern for tags is an excellent improvement. This simplification not only makes the workflow more flexible but also directly addresses the PR objective of preventing issues with building images when specific tags (like 'arabica') are added. The new pattern will match all version tags while allowing for additional naming conventions in the future.


27-27: Added flexibility with checkout_ref parameter

The addition of the checkout_ref parameter to both docker-security-build and docker-txsim-build jobs is a valuable improvement. This change directly addresses the PR objective of introducing necessary input parameters for manual workflow triggers. It allows for greater flexibility in the CI process by enabling builds from specific branches, tags, or commits when manually triggered.

To ensure this change is implemented correctly, let's verify the workflow structure:

Also applies to: 38-38


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@celestia-bot celestia-bot requested a review from a team September 25, 2024 13:46
@rootulp rootulp merged commit 10711c5 into main Sep 25, 2024
33 checks passed
@rootulp rootulp deleted the docker-action-updates branch September 25, 2024 19:26
rootulp added a commit that referenced this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants