increase version number#215
Conversation
WalkthroughThe project version is bumped from ChangesVersion bump 3.3.0 → 3.4.0
Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6efad27b-1c65-4d66-a341-d8ee6e4ecfba
📒 Files selected for processing (2)
.github/workflows/build-gradle-project.ymlbuild.gradle
| build-gradle-project: | ||
| env: | ||
| IMAGE_TAG: 3.3.0 | ||
| IMAGE_TAG: 3.4.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if gradle build output includes the docker image tag
./gradlew build docker 2>&1 | grep -i 'kingstonduo/pegasus-data'
# Check if there are any version extraction mechanisms in the workflow
grep -r "project.version\|gradle.*version\|version.txt" .github/workflows/Repository: KPMP/pegasus-data
Length of output: 134
🏁 Script executed:
# Check build.gradle around line 16 for version
echo "=== build.gradle lines 1-50 ==="
head -50 build.gradle
# Check the getCurrentGitBranch function around line 89
echo "=== build.gradle lines 80-100 ==="
sed -n '80,100p' build.gradle
# Read the full workflow file
echo "=== .github/workflows/build-gradle-project.yml ==="
cat .github/workflows/build-gradle-project.ymlRepository: KPMP/pegasus-data
Length of output: 3897
🏁 Script executed:
# Check if there's any mechanism to capture gradle output or image tag in workflow
grep -n "grep\|sed\|awk\|output" .github/workflows/build-gradle-project.yml
# Check if build.gradle has any output mechanism for the image tag
grep -n "println\|docker.*push\|docker.*tag\|docker.*image" build.gradleRepository: KPMP/pegasus-data
Length of output: 454
Fix Docker image tag mismatch between Gradle build and workflow push on master branch.
The current setup has a critical flaw: on the master branch, Gradle builds an image named kingstonduo/pegasus-data:3.4.0 (from project.version via getCurrentGitBranch()), but the workflow attempts to push kingstonduo/pegasus-data:master (line 49). This causes the push to fail because the locally built image has a different tag.
The core issue is that IMAGE_TAG and project.version in build.gradle are hardcoded separately:
- When on
develop: Both happen to be3.4.0, so the push succeeds - When on
master: Gradle builds3.4.0but the workflow tries to pushmaster— image tag mismatch
Extract the image tag dynamically from the Gradle build output instead of hardcoding IMAGE_TAG. This ensures a single source of truth for versioning across the build and deployment pipeline.
Summary by CodeRabbit