-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added artifactory resolution test for Go
- Loading branch information
1 parent
b747013
commit 136c0f1
Showing
6 changed files
with
108 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Golang example | ||
|
||
## Overview | ||
Go repositories are supported by Artifactory since version 5.11.0. | ||
To work with Go repositories you need to use [JFrog CLI](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory) and the Go client. | ||
|
||
## Prerequisite | ||
* Install version 1.11 or above of **go**. | ||
* Make sure the **go** command is in your PATH. | ||
* Install [JFrog CLI](https://jfrog.com/getcli/) | ||
* Make sure your Artifactory version is 5.11.0 or above | ||
* Make sure your JFrog CLI version is 2.0.0 or above | ||
|
||
## Running the Example | ||
'cd' to the root project directory | ||
|
||
```console | ||
Configure Artifactory: | ||
> jf c add --url=<JFROG_PLATFORM_URL> [credentials flags] | ||
|
||
Configure the project's repositories: | ||
> jf go-config --repo-resolve=<GO_RESOLVE_REPO> --repo-deploy=<GO_DEPLOY_REPO> | ||
|
||
Build the project with go and resolve the project dependencies from Artifactory. | ||
> jf go build --build-name=my-build --build-number=1 | ||
|
||
Publish version v1.0.0 of the package to the <GO_DEPLOY_REPO> repository in Artifactory. | ||
> jf go-publish v1.0.0 --build-name=my-build --build-number=1 | ||
|
||
Collect environment variables and add them to the build info. | ||
> jf rt bce my-build 1 | ||
|
||
Publish the build info to Artifactory. | ||
> jf rt bp my-build 1 | ||
``` | ||
|
||
Learn about [building go packages](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-BuildingGoPackages) and about Artifactory and [go registry](https://jfrog.com/integration/go-registry/) integration. |
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,10 @@ | ||
module github.com/you/hello | ||
|
||
go 1.20 | ||
|
||
require rsc.io/quote v1.5.2 | ||
|
||
require ( | ||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c // indirect | ||
rsc.io/sampler v1.3.0 // indirect | ||
) |
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,6 @@ | ||
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,11 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"rsc.io/quote" | ||
) | ||
|
||
func main() { | ||
fmt.Println(quote.Hello()) | ||
} |
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