XRAY-139364 - Automatically set VSC properties on uploaded artifacts#467
Closed
attiasas wants to merge 12 commits into
Closed
XRAY-139364 - Automatically set VSC properties on uploaded artifacts#467attiasas wants to merge 12 commits into
attiasas wants to merge 12 commits into
Conversation
…/mvn/npm/pnpm/terraform
…elp push, conan upload, python twine and uv, huggingface upload, nix copy, flexpack and npm publish
Author
|
continue at: #484 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(artifactory): attach local git VCS properties to published artifacts (XRAY-139364)Following:
Summary
Extends artifact VCS property collection beyond CI environment variables. When CI VCS props are missing or incomplete, the CLI now discovers local git metadata (
vcs.url,vcs.revision,vcs.branch) from the working directory and attaches it to artifacts during upload/publish flows. User-provided properties still take precedence over both CI and local git values.Changes
artifactory/utils/civcs/):localvcs.gowith local git discovery via upstream.gitsearchMergeWithUserAndDetectedPropsandSetVcsPropsToConfigwith precedence: user props > CI props > local git propsDeriveSearchDirFromUploadPatternfor upload pattern resolutionartifactory/utils/vcs.go: AddGetDotGitFromDirto locate a git repo root from a given directoryrt upload(generic upload)rt bp(buildinfo publish)SetVcsPropsToConfigcivcs, generic upload, buildinfo publish, npm, pnpm, terraform, conan, and per-command VCS smoke tests (helm, nix, flexpack, huggingface, python twine, docker build)Testing
go test ./artifactory/utils/... ./artifactory/commands/buildinfo/... \ ./artifactory/commands/conan/... ./artifactory/commands/flexpack/... \ ./artifactory/commands/helm/... ./artifactory/commands/huggingface/... \ ./artifactory/commands/nix/... ./artifactory/commands/npm/... \ ./artifactory/commands/ocicontainer/... ./artifactory/commands/pnpm/... \ ./artifactory/commands/python/... ./artifactory/commands/terraform/... -count=1