1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +02:00

docs: explain artifactory mode binary better

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2023-06-14 18:04:46 +00:00
parent 277339bf1f
commit 41536fd13d
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -22,20 +22,24 @@ artifactories:
Prerequisites:
- A running Artifactory instances
- A user + password / client x509 certificate / API key with grants to upload an artifact
- A user + password / client x509 certificate / API key with grants to upload
an artifact
### Target
The `target` is the URL to upload the artifacts to (_without_ the name of the artifact).
The `target` is the URL to upload the artifacts to (_without_ the name of the
artifact).
An example configuration for `goreleaser` in upload mode `binary` with the target can look like
An example configuration for `goreleaser` in upload mode `binary` with the
target can look like
```yaml
- mode: binary
target: 'http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}'
target: "http://artifacts.company.com:8081/artifactory/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"
```
and will result in a final deployment like `http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/1.0.0/Darwin/x86_64/goreleaser`.
And will result in a final deployment like
`http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/1.0.0/Darwin/x86_64/goreleaser`.
Supported variables:
@ -47,6 +51,7 @@ Supported variables:
- Arm
!!! info
Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`.
### Username
@ -82,8 +87,9 @@ The name will be transformed to uppercase.
### Client authorization with x509 certificate (mTLS / mutual TLS)
If your artifactory server supports authorization with mTLS (client certificates), you can provide them by specifying
the location of an x509 certificate/key pair of pem-encode files.
If your artifactory server supports authorization with mTLS (client
certificates), you can provide them by specifying the location of an x509
certificate/key pair of pem-encode files.
```yaml
artifactories:
@ -93,8 +99,8 @@ artifactories:
client_x509_key: path/to/client.key.pem
```
This will offer the client certificate during the TLS handshake, which your artifactory server may use to authenticate
and authorize you to upload.
This will offer the client certificate during the TLS handshake, which your
artifactory server may use to authenticate and authorize you to upload.
### Server authentication
@ -132,14 +138,13 @@ Of course, you can customize a lot of things:
# .goreleaser.yaml
artifactories:
# You can have multiple Artifactory instances.
-
# Unique name of your artifactory instance. Used to identify the instance
- # Unique name of your artifactory instance. Used to identify the instance
name: production
# IDs of the artifacts you want to upload.
ids:
- foo
- bar
- foo
- bar
# File extensions to filter for.
# This might be useful if you have multiple packages with different
@ -148,12 +153,16 @@ artifactories:
#
# Since: v1.7
exts:
- deb
- rpm
- deb
- rpm
# Upload mode. Valid options are `binary` and `archive`.
# If mode is `archive`, variables _Os_, _Arch_ and _Arm_ for target name are not supported.
# In that case these variables are empty.
#
# If mode is `archive`, variables _Os_, _Arch_ and _Arm_ for target name
# are not supported. In that case these variables are empty.
#
# If mode is `binary`, you'll need to have the archives section setup with
# format "binary" as well.
#
# Default: 'archive'
mode: archive
@ -188,7 +197,9 @@ artifactories:
-----END CERTIFICATE-----
```
These settings should allow you to push your artifacts into multiple Artifactories.
These settings should allow you to push your artifacts into multiple
**Artifactory** instances.
!!! tip
Learn more about the [name template engine](/customization/templates/).