You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-15 01:34:21 +02:00
docs: explain artifactory mode binary better
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
@ -22,20 +22,24 @@ artifactories:
|
|||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
- A running Artifactory instances
|
- 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
|
### 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
|
```yaml
|
||||||
- mode: binary
|
- 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:
|
Supported variables:
|
||||||
|
|
||||||
@ -47,6 +51,7 @@ Supported variables:
|
|||||||
- Arm
|
- Arm
|
||||||
|
|
||||||
!!! info
|
!!! info
|
||||||
|
|
||||||
Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`.
|
Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`.
|
||||||
|
|
||||||
### Username
|
### Username
|
||||||
@ -82,8 +87,9 @@ The name will be transformed to uppercase.
|
|||||||
|
|
||||||
### Client authorization with x509 certificate (mTLS / mutual TLS)
|
### Client authorization with x509 certificate (mTLS / mutual TLS)
|
||||||
|
|
||||||
If your artifactory server supports authorization with mTLS (client certificates), you can provide them by specifying
|
If your artifactory server supports authorization with mTLS (client
|
||||||
the location of an x509 certificate/key pair of pem-encode files.
|
certificates), you can provide them by specifying the location of an x509
|
||||||
|
certificate/key pair of pem-encode files.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
artifactories:
|
artifactories:
|
||||||
@ -93,8 +99,8 @@ artifactories:
|
|||||||
client_x509_key: path/to/client.key.pem
|
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
|
This will offer the client certificate during the TLS handshake, which your
|
||||||
and authorize you to upload.
|
artifactory server may use to authenticate and authorize you to upload.
|
||||||
|
|
||||||
### Server authentication
|
### Server authentication
|
||||||
|
|
||||||
@ -132,14 +138,13 @@ Of course, you can customize a lot of things:
|
|||||||
# .goreleaser.yaml
|
# .goreleaser.yaml
|
||||||
artifactories:
|
artifactories:
|
||||||
# You can have multiple Artifactory instances.
|
# 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
|
name: production
|
||||||
|
|
||||||
# IDs of the artifacts you want to upload.
|
# IDs of the artifacts you want to upload.
|
||||||
ids:
|
ids:
|
||||||
- foo
|
- foo
|
||||||
- bar
|
- bar
|
||||||
|
|
||||||
# File extensions to filter for.
|
# File extensions to filter for.
|
||||||
# This might be useful if you have multiple packages with different
|
# This might be useful if you have multiple packages with different
|
||||||
@ -148,12 +153,16 @@ artifactories:
|
|||||||
#
|
#
|
||||||
# Since: v1.7
|
# Since: v1.7
|
||||||
exts:
|
exts:
|
||||||
- deb
|
- deb
|
||||||
- rpm
|
- rpm
|
||||||
|
|
||||||
# Upload mode. Valid options are `binary` and `archive`.
|
# 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'
|
# Default: 'archive'
|
||||||
mode: archive
|
mode: archive
|
||||||
@ -188,7 +197,9 @@ artifactories:
|
|||||||
-----END CERTIFICATE-----
|
-----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
|
!!! tip
|
||||||
|
|
||||||
Learn more about the [name template engine](/customization/templates/).
|
Learn more about the [name template engine](/customization/templates/).
|
||||||
|
Reference in New Issue
Block a user