ci: Build and push docker image to quay.io#54
Conversation
|
Bito Automatic Review Skipped - Draft PR |
There was a problem hiding this comment.
Code Review Agent Run #2d515d
Actionable Suggestions - 1
-
Makefile - 1
- Git command may fail without version tags · Line 190-190
Review Details
-
Files reviewed - 1 · Commit Range:
4bd8aed..4bd8aed- Makefile
-
Files skipped - 1
- .github/workflows/docker.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at mithil@platform9.com.
Documentation & Help
| # v1.5.0-2-gb4c7af7-dirty | ||
| # v1.5.0-3-gbb39077 | ||
| # v1.5.0 | ||
| GIT_COMMIT := $(shell git describe --dirty --tags --match='v*') |
There was a problem hiding this comment.
The GIT_COMMIT variable uses git describe --dirty --tags --match='v*' which may fail if no tags matching 'v*' exist, causing build failures. Consider adding a fallback to git rev-parse --short HEAD for repositories without tags.
Code suggestion
Check the AI-generated fix before applying
| GIT_COMMIT := $(shell git describe --dirty --tags --match='v*') | |
| GIT_COMMIT := $(shell git describe --dirty --tags --match='v*' 2>/dev/null || git rev-parse --short HEAD$$(git diff-index --quiet HEAD -- || echo '-dirty')) |
Code Review Run #2d515d
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
There was a problem hiding this comment.
Ptal. If we don't want to handle this, then we must add our own stating with v. Can't depend on existing tags from upstream.
There was a problem hiding this comment.
@mridulgain I missed this. I'm not sure why we were tagging images as 2.x when the release version has been on 5.x.
There was a problem hiding this comment.
It likely stems from legacy settings where the tag version wasn’t updated when transitioning to 5.x. You may want to check if there's a misconfiguration in the versioning logic or an outdated tag reference that needs updating.
There was a problem hiding this comment.
To clarify, I've ensured we have a v.* tag available so that the image is correctly tagged. What versioning should we be using here?
There was a problem hiding this comment.
Since you've ensured that a v.* tag is available, aligning the image tag with our primary release version (5.x) would be ideal. We should use the current release version (e.g., v5.x) as the baseline and then append additional commit information if necessary.
|
Hold until August release is out. |
Fixes KAAP-908.
Summary by Bito
This pull request enhances the CI pipeline by adding new Docker-related targets in the Makefile. The changes introduce a tagging system that incorporates version, commit count, commit hash, and a dirty flag, ensuring unique image identifiers. These modifications streamline the automation process for building and pushing Docker images.