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: add support for feature branch build #3047

Conversation

purelind
Copy link
Collaborator

@purelind purelind commented Aug 2, 2024

Add support on multibranch build on feature branch of tidb & tiflash.

@ti-chi-bot ti-chi-bot bot requested a review from wuhuizuo August 2, 2024 06:26
Copy link

ti-chi-bot bot commented Aug 2, 2024

I have already done a preliminary review for you, and I hope to help you do a better job.

This pull request adds support for feature branch builds for tidb & tiflash. The key changes are:

  • If the branch starts with feature/, the script will use the master branch to build plugins.
  • In build_tiflash_multi_branch.groovy, image_tag is set to ${env.BRANCH_NAME} with forward slashes replaced by dashes.

Overall, the changes look good and the code appears to be working as expected. However, there are a few potential problems:

  • It might be better to explicitly check if env.TAG_NAME is null instead of relying on a ternary operator.
  • It might be good to add some error handling in case the plugin branch cannot be checked out.
  • In build_tiflash_multi_branch.groovy, if the branch name contains special characters, it may cause issues when using it as the image tag.

To fix these potential problems:

  • Change the branch variable to explicitly check if env.TAG_NAME is null.
  • Add catch clauses to handle any exceptions when checking out the plugin branch.
  • Sanitize the branch name before using it as the image tag.

Overall, the changes look good and the potential problems are minor. I would approve this pull request.

Copy link

ti-chi-bot bot commented Aug 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit e965abe into PingCAP-QE:main Aug 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant