mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
docs: Add first draft of documentation for Artifactory
The first draft of the Artifactory pipeline documentation was added.
This commit is contained in:
parent
c1d2c28b0a
commit
d9f349dd0c
78
docs/160-artifactory.md
Normal file
78
docs/160-artifactory.md
Normal file
@ -0,0 +1,78 @@
|
||||
---
|
||||
title: Artifactory
|
||||
---
|
||||
|
||||
Since [v0.38.0](https://github.com/goreleaser/goreleaser/releases/tag/v0.38.0),
|
||||
GoReleaser supports building and pushing artifacts into Artifactory.
|
||||
|
||||
## How it works
|
||||
|
||||
You can declare multiple Artifactory instances.
|
||||
All binaries generated by your `builds` section will be pushed to
|
||||
each configured Artifactory.
|
||||
|
||||
If you have only one Artifactory instance,
|
||||
the configuration is as easy as adding the
|
||||
upload target and a usernameto your `.goreleaser.yml` file:
|
||||
|
||||
```yaml
|
||||
artifactories:
|
||||
- target: http://<Your-Instance>:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}
|
||||
username: goreleaser
|
||||
```
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- A running Artifactory instances
|
||||
- A user + password / API key with grants to upload an artifact
|
||||
|
||||
### Target
|
||||
|
||||
The `target` is the final URL of _without_ the binary name.
|
||||
|
||||
A configuration for `goreleaser` with the target
|
||||
|
||||
```
|
||||
http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
|
||||
```
|
||||
|
||||
will result in a final deployment like
|
||||
|
||||
```
|
||||
http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/Darwin/x86_64/goreleaser
|
||||
```
|
||||
|
||||
Support variables:
|
||||
|
||||
- Os
|
||||
- Arch
|
||||
- Arm
|
||||
- Version
|
||||
- Tag
|
||||
- ProjectName
|
||||
|
||||
### Password / API Key
|
||||
|
||||
Your configured username needs to be authenticated against your Artifactory.
|
||||
|
||||
The password or API key will be stored in a environment variable.
|
||||
If you have only one Artifactory configured, you will store the secret in `ARTIFACTORY_0_SECRET`.
|
||||
|
||||
If you have multiple instances configured, you store the password for the second instance in `ARTIFACTORY_1_SECRET`,
|
||||
for the third in `ARTIFACTORY_2_SECRET` and so on.
|
||||
|
||||
## Customization
|
||||
|
||||
Of course, you can customize a lot of things:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
artifactories:
|
||||
# You can have multiple Artifactory instances.
|
||||
-
|
||||
# URL of your Artifactory instance + path to deploy to
|
||||
target: http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
|
||||
# User that will be used for the deployment
|
||||
```
|
||||
|
||||
These settings should allow you to push your artifacts into multiple Artifactories.
|
Loading…
x
Reference in New Issue
Block a user