-
Notifications
You must be signed in to change notification settings - Fork 89
Introduce support for multisource and new source type 'package' #1390
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
48ffd9e
Update dependencies
rimapol 7f177c3
Update dependencies
rimapol e3569ff
Merge remote-tracking branch 'upstream/dev' into dev
rimapol b9a3db2
Merge remote-tracking branch 'upstream/dev' into dev
rimapol 18cd3c9
Introduce support for create release bundle from multiple sources def…
rimapol 3982220
Update dependencies
rimapol affb72c
Update dependencies
rimapol f15fd08
Update dependencies
rimapol 738a986
Update dependencies
rimapol a5109c2
Resolve conflicts
rimapol 12d19a1
Resolve dependencies
rimapol e5b6e96
Update common/spec/specfiles.go
rimapol 9861c83
Update artifactory/utils/search.go
rimapol 1253639
Update artifactory/utils/search.go
rimapol e24cdff
Change ValidateSpec - support Package and multiple sources
rimapol bd9253b
Fix struct File (RepoKey)
rimapol 3a07b64
update dependencies
rimapol 177ec14
Resolve conflicts
rimapol 79186c3
Update dependencies
rimapol 44cbb94
Update dependencies
rimapol 75a0253
Update dependencies
rimapol c031363
Update dependencies
rimapol d2a25c9
Update dependencies
rimapol c3b23bb
Merge branch 'dev' into dev
rimapol 4351e68
Update dependencies
rimapol 239db9d
Update dependencies
rimapol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,10 @@ type File struct { | |
| Transitive string | ||
| TargetPathInArchive string | ||
| include []string | ||
| Package string `json:"package,omitempty"` | ||
| Version string `json:"version,omitempty"` | ||
| Type string `json:"type,omitempty"` | ||
| RepoKey string `json:"repoKey,omitempty"` | ||
| } | ||
|
|
||
| func (f File) GetInclude() []string { | ||
|
|
@@ -217,6 +221,11 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec bool) error | |
| isExplode, _ := file.IsExplode(false) | ||
| isBypassArchiveInspection, _ := file.IsBypassArchiveInspection(false) | ||
| isTransitive, _ := file.IsTransitive(false) | ||
| isPackage := len(file.Package) > 0 | ||
| isVersion := len(file.Version) > 0 | ||
| isType := len(file.Type) > 0 | ||
| isRepoKey := len(file.RepoKey) > 0 | ||
|
|
||
| if isPathMapping { | ||
| if !isAql { | ||
| return errorutils.CheckErrorf("pathMapping is supported only with aql") | ||
|
|
@@ -234,11 +243,9 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec bool) error | |
| if !isSearchBasedSpec && !isPattern { | ||
| return errorutils.CheckErrorf("spec must include a pattern") | ||
| } | ||
| if isBuild && isBundle { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this condition removed?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fluxxBot Because this condition isn't valid anymore. It may be both builds and bundles |
||
| return fileSpecValidationError("build", "bundle") | ||
| } | ||
| if isSearchBasedSpec && !isAql && !isPattern && !isBuild && !isBundle { | ||
| return errorutils.CheckErrorf("spec must include either aql, pattern, build or bundle") | ||
|
|
||
| if isSearchBasedSpec && !isAql && !isPattern && !isBuild && !isBundle && !isPackage { | ||
| return errorutils.CheckErrorf("spec must include either aql, pattern, build, bundle or package") | ||
| } | ||
| if isOffset { | ||
| if isBuild { | ||
|
|
@@ -259,9 +266,6 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec bool) error | |
| return fileSpecValidationError("bundle", "limit") | ||
| } | ||
| } | ||
| if isAql && isPattern { | ||
| return fileSpecValidationError("aql", "pattern") | ||
| } | ||
| if isAql && isExclusions { | ||
| return fileSpecValidationError("aql", "exclusions") | ||
| } | ||
|
|
@@ -295,6 +299,11 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec bool) error | |
| if isBypassArchiveInspection && !isExplode { | ||
| return errorutils.CheckErrorf("spec cannot include 'bypass-archive-inspection' if 'explode' is not included") | ||
| } | ||
| if isPackage { | ||
| if !isVersion || !isType || !isRepoKey { | ||
| return errorutils.CheckErrorf("spec with type 'package' must include 'version', 'type' and 'repo_key'") | ||
| } | ||
| } | ||
| } | ||
| return nil | ||
| } | ||
|
|
||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.