Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Sep 19, 2022
1 parent e0312a1 commit 9784bcc
Show file tree
Hide file tree
Showing 40 changed files with 2,371 additions and 55 deletions.
Binary file modified docs/modules/ROOT/assets/images/jreleaser-workflow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/modules/ROOT/pages/integrations.adoc
Expand Up @@ -32,6 +32,17 @@ Releases may be posted to the following services:

IMPORTANT: The `generic` releaser does not support all features.

== Deploy

Staged artifacts may be deployed to the following services:

.Maven
* xref:configuration:deploy/maven/artifactory.adoc[]
* xref:configuration:deploy/maven/gitea.adoc[]
* xref:configuration:deploy/maven/gitlab.adoc[]
* xref:configuration:deploy/maven/github.adoc[]
* xref:configuration:deploy/maven/nexus2.adoc[]

== Upload

Artifacts, checksums, signatures may be uploaded to the following services:
Expand Down
15 changes: 13 additions & 2 deletions docs/modules/ROOT/pages/workflow.adoc
Expand Up @@ -79,9 +79,19 @@ xref:tools:jreleaser-maven.adoc#_jreleasersign[{icon_maven_s} jreleaser:sign],
xref:tools:jreleaser-gradle.adoc#_jreleasersign[{icon_gradle_s} jreleaserSign],
xref:tools:jreleaser-ant.adoc#_jreleaser_sign[{icon_ant_s} jreleaser-sign]

== Deploy

Deploys staged artifacts to the configured destinations. This step is optional.

xref:tools:jreleaser-cli.adoc#_deploy[{icon_cli_s} deploy],
xref:tools:jreleaser-maven.adoc#_jreleaserdeploy[{icon_maven_s} jreleaser:deploy],
xref:tools:jreleaser-gradle.adoc#_jreleaserdeploy[{icon_gradle_s} jreleaserDeploy],
xref:tools:jreleaser-ant.adoc#_jreleaser_deploy[{icon_ant_s} jreleaser-deploy]


== Upload

Uploads artifacts and files to the configured destinations. This step uploads signatures (if enabled), all distribution
Uploads distribution artifacts and files to the configured destinations. This step uploads signatures (if enabled), all distribution
artifacts, and every matching file configured in the xref:configuration:files.adoc[] section. This step is optional.

Depends on <<_sign>>.
Expand All @@ -97,7 +107,7 @@ Creates a release at the configured remote Git repository (see xref:configuratio
all checksums, signatures (if enabled), all distribution artifacts, and every matching file configured in the
xref:configuration:files.adoc[] section. Automatically calculates a changelog & tags the release.

Depends on <<_upload>>.
Depends on <<_deploy>>, <<_upload>>.

xref:tools:jreleaser-cli.adoc#_release[{icon_cli_s} release],
xref:tools:jreleaser-maven.adoc#_jreleaserrelease[{icon_maven_s} jreleaser:release],
Expand Down Expand Up @@ -172,6 +182,7 @@ Executes all steps in single session in the following order:
* <<_changelog>>
* <<_checksum>>
* <<_sign>>
* <<_deploy>>
* <<_upload>>
* <<_release>>
* <<_prepare>>
Expand Down
7 changes: 7 additions & 0 deletions docs/modules/configuration/nav.adoc
Expand Up @@ -23,6 +23,13 @@
*** xref:assemble/jpackage.adoc[]
*** xref:assemble/native-image.adoc[]
** xref:checksum.adoc[]
** xref:deploy/index.adoc[]
*** xref:deploy/maven/index.adoc[]
**** xref:deploy/maven/artifactory.adoc[]
**** xref:deploy/maven/gitea.adoc[]
**** xref:deploy/maven/github.adoc[]
**** xref:deploy/maven/gitlab.adoc[]
**** xref:deploy/maven/nexus2.adoc[]
** xref:distributions.adoc[]
** xref:download/index.adoc[]
*** xref:download/ftp.adoc[]
Expand Down
101 changes: 101 additions & 0 deletions docs/modules/configuration/pages/deploy/index.adoc
@@ -0,0 +1,101 @@
= Deploy

Artifacts may be deployed to configured locations.

include::partial$legend.adoc[]

[tabs]
====
YAML::
+
--
[source,yaml]
[subs="+macros"]
----
# icon:dot-circle[]
deploy:
# Enable or disable all configured deployers.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `ALWAYS`.
# icon:dot-circle[]
active: ALWAYS
----
--
TOML::
+
--
[source,toml]
[subs="+macros"]
----
# icon:dot-circle[]
[deploy]
# Enable or disable all configured deployers.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `ALWAYS`.
# icon:dot-circle[]
active = "ALWAYS"
----
--
JSON::
+
--
[source,json]
[subs="+macros"]
----
{
// icon:dot-circle[]
"deploy": {
// Enable or disable all configured deployers.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `ALWAYS`.
// icon:dot-circle[]
"active": "ALWAYS"
}
}
----
--
Maven::
+
--
[source,xml]
[subs="verbatim,+macros"]
----
<jreleaser>
<!--
icon:dot-circle[]
-->
<deploy>
<!--
Enable or disable all configured deployers.
Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
Defaults to `ALWAYS`.
icon:dot-circle[]
-->
<active>ALWAYS</active>
</deploy>
</jreleaser>
----
--
Gradle::
+
--
[source,groovy]
[subs="+macros"]
----
jreleaser {
// icon:dot-circle[]
deploy {
// Enable or disable all configured deployers.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `ALWAYS`.
// icon:dot-circle[]
active = 'ALWAYS'
}
}
----
--
====

NOTE: When not explicitly set, the value of `active` may be resolved from an environment variable `JRELEASER_DEPLOY_ACTIVE`
or from a system property `jreleaser.deploy.active`. The system property takes precedence over the environment variable.
205 changes: 205 additions & 0 deletions docs/modules/configuration/pages/deploy/maven/artifactory.adoc
@@ -0,0 +1,205 @@
= Artifactory
:deployer_id: artifactory
:deployer_name: Artifactory
:prefix: ARTIFACTORY
:deployer_url: https://duke.jfrog.io/artifactory/maven
:default_auth: BEARER

Deploys staged artifacts to link:https://jfrog.com/artifactory/[JFrog {deployer_name}] instance.

.Prerequisites:

* A running Artifactory instance.
* A user + password / token with grants to deploy an artifact.

IMPORTANT: This feature *does not* support deploying artifacts other than JARs and POMs to a Maven compatible repository.
If you need to upload any other binaries then check the xref:configuration:upload/{deployer_id}.adoc[{deployer_name} Uploader].

include::partial$legend.adoc[]

[tabs]
====
YAML::
+
--
[source,yaml]
[subs="attributes,+macros"]
----
include::partial$deploy/maven/yaml/common-head.adoc[]
----
--
TOML::
+
--
[source,toml]
[subs="attributes,+macros"]
----
include::partial$deploy/maven/toml/common-head.adoc[]
----
--
JSON::
+
--
[source,json]
[subs="attributes,+macros"]
----
include::partial$deploy/maven/json/common-head.adoc[]
include::partial$deploy/maven/json/common-footer.adoc[]
----
--
Maven::
+
--
[source,xml]
[subs="attributes,verbatim,+macros"]
----
include::partial$deploy/maven/maven/common-head.adoc[]
include::partial$deploy/maven/maven/common-footer.adoc[]
----
--
Gradle::
+
--
[source,groovy]
[subs="attributes,+macros"]
----
include::partial$deploy/maven/gradle/common-head.adoc[]
include::partial$deploy/maven/gradle/common-footer.adoc[]
----
--
====

== Url

You may set the url in the configuration as shown above, or you can have it read from an environment variable.
The configured name of the {deployer_name} instance will be used to build the environment variable name.
This means that the name per configured instance needs to be unique.

The name of the environment variable will be `JRELEASER_{prefix}_NAME_URL`. If your instance is named `production`,
you can store the host in the environment variable `JRELEASER_{prefix}_PRODUCTION_URL`. The name will be
transformed to uppercase.

== Username

The configured username needs to be authenticated against the {deployer_name} instance.

You may set the username set in the configuration as shown above, or you can have it read from an environment variable.
The configured name of the {deployer_name} instance will be used to build the environment variable name.
This means that the name per configured instance needs to be unique.

The name of the environment variable will be `JRELEASER_{prefix}_NAME_USERNAME`. If your instance is named `production`,
you can store the username in the environment variable `JRELEASER_{prefix}_PRODUCTION_USERNAME`. The name will be
transformed to uppercase.

If a configured username is found in the configuration file, then the environment variable is not used at all.

== Password

The password will be stored in an environment variable. The configured name of the {deployer_name} instance will
be used. This means that the name per configured instance needs to be unique.

The name of the environment variable will be `JRELEASER_{prefix}_NAME_PASSWORD`. If your instance is named `production`,
you need to store the secret in the environment variable `JRELEASER_{prefix}_PRODUCTION_PASSWORD`. The name will be
transformed to uppercase.

== Example

[tabs]
====
YAML::
+
--
[source,yaml]
[subs="attributes,+macros"]
----
deploy:
maven:
{deployer_id}:
app:
active: always
url: {deployer_url}
stagingRepositories:
- target/staging-deploy
----
--
TOML::
+
--
[source,toml]
[subs="attributes,+macros"]
----
[deploy.maven.{deployer_id}.app]
active = "ALWAYS"
host = "{deployer_url}"
stagingRepositories = ["target/staging-deploy"]
----
--
JSON::
+
--
[source,json]
[subs="attributes,+macros"]
----
{
"jreleaser": {
"deploy": {
"maven": {
"{deployer_id}": {
"app": {
"active": "ALWAYS",
"host": "{deployer_url}",
"stagingRepositories": [
"target/staging-deploy"
]
}
}
}
}
}
}
----
--
Maven::
+
--
[source,xml]
[subs="attributes,verbatim,+macros"]
----
<jreleaser>
<deploy>
<maven>
<{deployer_id}>
<app>
<active>ALWAYS</active>
<host>{deployer_url}</host>
<stagingRepositories>target/staging-deploy</stagingRepositories>
</app>
</{deployer_id}>
</maven>
</deploy>
</jreleaser>
----
--
Gradle::
+
--
[source,groovy]
[subs="attributes,+macros"]
----
jreleaser {
deploy {
maven {
{deployer_id} {
app {
active = 'ALWAYS'
host = '{deployer_url}'
stagingRepository('target/staging-deploy')
}
}
}
}
}
----
--
====

0 comments on commit 9784bcc

Please sign in to comment.