Files
jreleaser.github.io/docs/modules/configuration/pages/environment.adoc
2021-04-09 10:40:27 +02:00

223 lines
5.9 KiB
Plaintext

= Environment
JReleaser can configure some of its fields from external sources. This allows keeping a stable configuration file and only
update the external sources to produce a new release. Values may be read from a Java `.properties` file or from
environment variables, the file has precendence over the environment variables.
By default, the external properties file should be located at `~/.jreleaser/config.properties` however you may change
that location by setting/changing the value of the `JRELEASER_USER_HOME` environment variable or using the block
described next:
include::partial$legend.adoc[]
[tabs]
====
YAML::
+
[source,yaml]
[subs="+macros"]
----
# Configures environment sources.
# icon:dot-circle[]
environment:
# Location of a `.properties` file with key/value pairs
# Each key must be prefixed with `JRELEASER_` and match
# the environment variable it overrides.
# icon:dot-circle[]
variables: path/to/alternate/config.properties
----
JSON::
+
[source,json]
[subs="+macros"]
----
{
// Configures environment sources.
// icon:dot-circle[]
"environment": {
// Location of a `.properties` file with key/value pairs
// Each key must be prefixed with `JRELEASER_` and match
// the environment variable it overrides.
// icon:dot-circle[]
"variables": "path/to/alternate/config.properties"
}
}
----
Maven::
+
[source,xml]
[subs="+macros,verbatim"]
----
<jreleaser>
<!--
Configures environment sources.
icon:dot-circle[]
-->
<environment>
<!--
Location of a `.properties` file with key/value pairs
Each key must be prefixed with `JRELEASER_` and match
the environment variable it overrides.
icon:dot-circle[]
-->
<variables>path/to/alternate/config.properties</variables>
</environment>
</jreleaser>
----
Gradle::
+
[source,groovy]
[subs="+macros"]
----
jreleaser {
// Configures environment sources.
// icon:dot-circle[]
environment {
// Location of a `.properties` file with key/value pairs
// Each key must be prefixed with `JRELEASER_` and match
// the environment variable it overrides.
// icon:dot-circle[]
variables = 'path/to/alternate/config.properties'
}
}
----
====
== Project
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_PROJECT_VERSION | the project version
| JRELEASER_SNAPSHOT_PATTERN | a regex to determine if the project version is snapshot
|===
== Release
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_TAG_NAME | the release tag name
| JRELEASER_RELEASE_NAME | the release name
| JRELEASER_MILESTONE_NAME | the milestone name/title
| JRELEASER_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_GITEA_TOKEN | a Gitea personal token
|===
== Signing
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_GPG_PASSPHRASE | the passphrase to decrypt the secret key
| JRELEASER_GPG_PUBLIC_KEY | the public key used for signing
| JRELEASER_GPG_SECRET_KEY | the secret key used for signing
|===
== Docker
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_DOCKER_${NAME}_PASSWORD | a docker password matching the named server
|===
== Homebrew
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_HOMEBREW_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_HOMEBREW_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_HOMEBREW_GITEA_TOKEN | a Gitea personal token
|===
== Chocolatey
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_CHOCOLATEY_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_CHOCOLATEY_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_CHOCOLATEY_GITEA_TOKEN | a Gitea personal token
|===
== Jbang
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_JBANG_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_JBANG_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_JBANG_GITEA_TOKEN | a Gitea personal token
|===
== Scoop
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_SCOOP_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_SCOOP_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_SCOOP_GITEA_TOKEN | a Gitea personal token
|===
== Snap
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_SNAP_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_SNAP_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_SNAP_GITEA_TOKEN | a Gitea personal token
|===
== Mail
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_MAIL_PASSWORD | the password required for sending e-mails
|===
== Sdkman
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_SDKMAN_CONSUMER_KEY | the consumer key required by SDKMAN!
| JRELEASER_SDKMAN_CONSUMER_TOKEN | the consumer token required by SDKMAN!
|===
== Slack
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_SLACK_TOKEN | a bot or a personal Slack token
|===
== Twitter
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_TWITTER_CONSUMER_KEY | the consumer key required by Twitter
| JRELEASER_TWITTER_CONSUMER_TOKEN | the consumer token required by Twitter
| JRELEASER_TWITTER_ACCESS_TOKEN | the access token required by Twitter
| JRELEASER_TWITTER_ACCESS_TOKEN_SECRET | the access token secret required by Twitter
|===
== Zulip
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_ZULIP_API_KEY | the api key required by Zulip
|===