-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New
exclusions
options for go-publish (#2044)
* gp --exclusion new flag
- Loading branch information
Showing
20 changed files
with
219 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"pattern": "${GO_REPO}/*" | ||
} | ||
] | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 1 | ||
type: go | ||
|
||
resolver: | ||
repo: ${GO_VIRTUAL_REPO} | ||
serverID: default | ||
deployer: | ||
repo: ${GO_REPO} | ||
serverID: default |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module github.com/jfrog/dependency | ||
|
||
require ( | ||
github.com/pkg/errors v0.8.0 | ||
rsc.io/quote v1.5.2 | ||
) | ||
|
||
go 1.13 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dependency | ||
|
||
import ( | ||
"fmt" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
func PrintHello() error { | ||
fmt.Println("Hello") | ||
return errors.New("abc") | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= | ||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= | ||
rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= | ||
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= | ||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 1 | ||
type: go | ||
|
||
resolver: | ||
repo: ${GO_VIRTUAL_REPO} | ||
serverID: default | ||
deployer: | ||
repo: ${GO_REPO} | ||
serverID: default |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module github.com/jfrog/dependency | ||
|
||
require ( | ||
github.com/pkg/errors v0.8.0 | ||
rsc.io/quote v1.5.2 | ||
) | ||
|
||
go 1.13 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dependency | ||
|
||
import ( | ||
"fmt" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
func PrintHello() error { | ||
fmt.Println("Hello World") | ||
return errors.New("abc") | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
a.txt |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
b.txt |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
c.txt |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
d.txt |
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= | ||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= | ||
rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= | ||
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= | ||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= |
This file contains 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 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 |
---|---|---|
|
@@ -94,6 +94,7 @@ const ( | |
SearchAllProdRepo = "search_all_prod_repo.json" | ||
SearchDistRepoByInSuffix = "search_dist_repo_by_in_suffix.json" | ||
SearchRepo1ByInSuffix = "search_repo1_by_in_suffix.json" | ||
GoPublishRepoExcludes = "go_publish_repo_excludes.json" | ||
SearchRepo1IncludeDirs = "search_repo1_include_dirs.json" | ||
SearchRepo1NonExistFile = "search_repo1_ant_test_file.json" | ||
SearchRepo1NonExistFileAntExclusions = "search_repo1_ant_and_exclusions_test_file.json" | ||
|
@@ -215,6 +216,7 @@ var ( | |
LcRbName1 = "cli-lc-rb1" | ||
LcRbName2 = "cli-lc-rb2" | ||
LcRbName3 = "cli-lc-rb3" | ||
GoPublishWithExclusionPath = "github.com/jfrog/dependency/@v/github.com/jfrog/[email protected]/" | ||
|
||
// Users | ||
UserName1 = "alice" | ||
|
@@ -262,6 +264,16 @@ func GetExpectedExcludeUploadPart2() []string { | |
RtRepo1 + "/", | ||
} | ||
} | ||
func GetExpectedExcludeUpload2() []string { | ||
return []string{ | ||
RtRepo1 + "/b3.in", | ||
RtRepo1 + "/a2.in", | ||
RtRepo1 + "/a3.in", | ||
RtRepo1 + "/a1.in", | ||
RtRepo1 + "/c", | ||
RtRepo1 + "/", | ||
} | ||
} | ||
func GetExpectedExcludeUploadIncludeDir() []string { | ||
return []string{ | ||
RtRepo1 + "/a2.in", | ||
|
@@ -272,6 +284,14 @@ func GetExpectedExcludeUploadIncludeDir() []string { | |
} | ||
} | ||
|
||
func GetUploadLegacyPropsExpected() []string { | ||
return []string{ | ||
RtRepo1 + "/data/a1.in", | ||
RtRepo1 + "/data/a2.in", | ||
RtRepo1 + "/data/a3.in", | ||
} | ||
} | ||
|
||
func GetSearchAppendedBuildNoPatternExpected() []string { | ||
return []string{ | ||
RtRepo1 + "/data/a1.in", | ||
|
@@ -2078,3 +2098,54 @@ func GetExpectedLifecycleArtifacts() []string { | |
RtProdRepo + "/c3.in", | ||
} | ||
} | ||
|
||
func GetGoPublishWithExclusionsExpectedRepoGo() []string { | ||
var expected = []string{ | ||
GoRepo + "/github.com/jfrog/dependency/@v/v1.1.1.info", | ||
GoRepo + "/github.com/jfrog/dependency/@v/v1.1.1.mod", | ||
GoRepo + "/github.com/jfrog/dependency/@v/v1.1.1.zip", | ||
} | ||
return expected | ||
} | ||
|
||
func GetGoPublishWithExclusionsExpectedFiles1() []string { | ||
var expected = []string{ | ||
GoPublishWithExclusionPath + "dir4/d.txt", | ||
} | ||
return expected | ||
} | ||
|
||
func GetGoPublishWithExclusionsExcludedFiles1() []string { | ||
var excluded = []string{ | ||
GoPublishWithExclusionPath + "dir1/a.txt", | ||
GoPublishWithExclusionPath + "dir1/dir2/b.txt", | ||
GoPublishWithExclusionPath + "dir1/dir2/dir3/c.txt", | ||
} | ||
return excluded | ||
} | ||
|
||
func GetGoPublishWithExclusionsExpectedFiles2() []string { | ||
var expected = []string{ | ||
GoPublishWithExclusionPath + "dir4/d.txt", | ||
GoPublishWithExclusionPath + "dir1/a.txt", | ||
} | ||
return expected | ||
} | ||
|
||
func GetGoPublishWithExclusionsExcludedFiles2() []string { | ||
var excluded = []string{ | ||
GoPublishWithExclusionPath + "dir1/dir2/b.txt", | ||
GoPublishWithExclusionPath + "dir1/dir2/dir3/c.txt", | ||
} | ||
return excluded | ||
} | ||
|
||
func GetGoPublishWithExclusionsExcludedFiles3() []string { | ||
var excluded = []string{ | ||
GoPublishWithExclusionPath + "dir1/a.txt", | ||
GoPublishWithExclusionPath + "dir1/dir2/b.txt", | ||
GoPublishWithExclusionPath + "dir1/dir2/dir3/c.txt", | ||
GoPublishWithExclusionPath + "dir4/d.txt", | ||
} | ||
return excluded | ||
} |
This file contains 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