Skip to content

feat: git tag step + tag support for git push#5785

Open
fuskovic wants to merge 35 commits intomainfrom
fuskovic/git-tag
Open

feat: git tag step + tag support for git push#5785
fuskovic wants to merge 35 commits intomainfrom
fuskovic/git-tag

Conversation

@fuskovic
Copy link
Member

@fuskovic fuskovic commented Feb 24, 2026

Closes: #5737

Demo

tag+push-demo.mov

Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit b002dc5
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/69a1941e5ccac30008dd1ea7
😎 Deploy Preview https://deploy-preview-5785.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fuskovic fuskovic changed the title Fuskovic/git tag feat: git tag step Feb 24, 2026
@fuskovic fuskovic self-assigned this Feb 24, 2026
@fuskovic fuskovic added priority/high Needs to be addressed sooner rather than later area/controller Affects the (main) controller kind/enhancement An entirely new feature labels Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 49.47368% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.24%. Comparing base (e8877b6) to head (b002dc5).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/promotion/runner/builtin/git_tagger.go 55.55% 18 Missing and 6 partials ⚠️
pkg/controller/git/work_tree.go 28.00% 17 Missing and 1 partial ⚠️
pkg/gitprovider/registry.go 0.00% 3 Missing ⚠️
pkg/controller/git/mock_repo.go 0.00% 2 Missing ⚠️
pkg/promotion/runner/builtin/git_pusher.go 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5785      +/-   ##
==========================================
- Coverage   56.25%   56.24%   -0.01%     
==========================================
  Files         451      452       +1     
  Lines       37840    37959     +119     
==========================================
+ Hits        21286    21350      +64     
- Misses      15293    15340      +47     
- Partials     1261     1269       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
… while keeping things DRY

Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
@fuskovic fuskovic changed the title feat: git tag step feat: git tag step + tag support for git push Feb 25, 2026
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Comment on lines +36 to +39
if reg.Predicate != nil && reg.NewProvider != nil {
if reg.Predicate(repoURL) {
return reg.NewProvider(repoURL, opts)
}
Copy link
Member

Choose a reason for hiding this comment

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

Total aside and note to self... I realize this code wasn't ever refactored to use the PredicateBasedRegistry. Out of scope for this PR, but I should fix that.

fuskovic and others added 11 commits February 27, 2026 16:09
Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
Signed-off-by: fuskovic <fhuskovic92@gmail.com>
@fuskovic
Copy link
Member Author

fuskovic commented Feb 27, 2026

@krancour I've pushed the suggested changes and updated the demo in the PR description to show the commit information. Some notes:

  • The commit URL only populates when the provider is set, so I've updated the output to omit that key/value pair entirely if provider is not provided or if it is and we fail to get the commit URL.

  • You'll notice in the current demo the branch is included in the output for git pushing tags. I'm wondering if we want to keep that behavior or have tag and branch be mutually exclusive in the output?

Alternatively, we can always set all output keys unconditionally so they can always be referenced dynamically in other steps (regardless if they're empty).

Thoughts?

@fuskovic fuskovic requested a review from krancour February 27, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller Affects the (main) controller kind/enhancement An entirely new feature priority/high Needs to be addressed sooner rather than later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add git-tag step; make git-push step support pushing tags

2 participants