mirror of
https://github.com/jlengrand/jreleaser.github.io.git
synced 2026-05-18 15:53:47 +00:00
Add jenkins page
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
.Continuous Integration
|
||||
* xref:github-actions.adoc[]
|
||||
* xref:jenkins.adoc[]
|
||||
|
||||
101
docs/modules/continuous-integration/pages/jenkins.adoc
Normal file
101
docs/modules/continuous-integration/pages/jenkins.adoc
Normal file
@@ -0,0 +1,101 @@
|
||||
= Jenkins
|
||||
|
||||
You can setup a link:https://www.jenkins.io[Jenkins] pipeline for Linux and Windows agents:
|
||||
|
||||
[tabs]
|
||||
====
|
||||
Linux Agent::
|
||||
+
|
||||
--
|
||||
[source,groovy]
|
||||
----
|
||||
pipeline {
|
||||
...
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
// Define your build step as you'd normally would.
|
||||
// example:
|
||||
git url: 'http://github.com/duke/app.git', branch: 'main'
|
||||
sh 'mvn verify'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Release') {
|
||||
tools {
|
||||
// JRelease requires Java 11 to run.
|
||||
// Configure your own JDK 11+ installation
|
||||
// and refer to it here
|
||||
jdk '11'
|
||||
}
|
||||
|
||||
environment {
|
||||
// Setup required environment variables
|
||||
JRELEASER_GITHUB_TOKEN = credentials('github-token')
|
||||
}
|
||||
|
||||
steps {
|
||||
// Get the jreleaser downloader
|
||||
sh 'curl -sL https://git.io/get-jreleaser > get_jreleaser.java'
|
||||
// Download JReleaser with version = ${version}
|
||||
// Change ${version} to a tagged JReleaser release
|
||||
sh 'java get_jreleaser.java ${version}'
|
||||
// Let's check we've got the right version
|
||||
sh 'java -jar jreleaser-cli.jar --version'
|
||||
// Execute a JReleaser command such as 'full-release'
|
||||
sh 'java -jar jreleaser-cli.jar full-release'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
--
|
||||
Windows Agent::
|
||||
+
|
||||
--
|
||||
[source,groovy]
|
||||
----
|
||||
pipeline {
|
||||
...
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
// Define your build step as you'd normally would.
|
||||
// example:
|
||||
git url: 'http://github.com/duke/app.git', branch: 'main'
|
||||
bat 'mvn verify'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Release') {
|
||||
tools {
|
||||
// JRelease requires Java 11 to run.
|
||||
// Configure your own JDK 11+ installation
|
||||
// and refer to it here
|
||||
jdk '11'
|
||||
}
|
||||
|
||||
environment {
|
||||
// Setup required environment variables
|
||||
JRELEASER_GITHUB_TOKEN = credentials('github-token')
|
||||
}
|
||||
|
||||
steps {
|
||||
// Get the jreleaser downloader
|
||||
bat 'powershell -Command "(new-object net.webclient).DownloadString(\'https://git.io/get-jreleaser\')" > get_jreleaser.java'
|
||||
// Download JReleaser with version = ${version}
|
||||
// Change ${version} to a tagged JReleaser release
|
||||
bat 'java get_jreleaser.java ${version}'
|
||||
// Let's check we've got the right version
|
||||
bat 'java -jar jreleaser-cli.jar --version'
|
||||
// Execute a JReleaser command such as 'full-release'
|
||||
bat 'java -jar jreleaser-cli.jar full-release'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
--
|
||||
====
|
||||
@@ -77,11 +77,11 @@ HEAD is at c3e39f1
|
||||
dryrun set to false
|
||||
Generating changelog: out/jreleaser/release/CHANGELOG.md
|
||||
Calculating checksums
|
||||
[checksum] target/distributions/app/app-1.0.0.zip
|
||||
Signing files
|
||||
Signing is not enabled
|
||||
Signing is not enabled. Skipping
|
||||
Releasing to https://github.com/duke/app
|
||||
- Uploading app-1.0.0.zip
|
||||
- Uploading app-1.0.0.tar.gz
|
||||
- Uploading checksums.txt
|
||||
Preparing distributions
|
||||
- Preparing app distribution
|
||||
@@ -91,7 +91,7 @@ Uploading distributions
|
||||
- Uploading app distribution
|
||||
Announcing release
|
||||
Announcing is not enabled. Skipping.
|
||||
JReleaser succeeded after 3.007s
|
||||
JReleaser succeeded after 0.894s
|
||||
Writing output properties to out/jreleaser/output.properties
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
@@ -65,11 +65,11 @@ $ jreleaser full-release
|
||||
[INFO] dryrun set to false
|
||||
[INFO] Generating changelog: out/jreleaser/release/CHANGELOG.md
|
||||
[INFO] Calculating checksums
|
||||
[INFO] [checksum] target/distributions/app/app-1.0.0.zip
|
||||
[INFO] Signing files
|
||||
[INFO] Signing is not enabled
|
||||
[INFO] Signing is not enabled. Skipping
|
||||
[INFO] Releasing to https://github.com/duke/app
|
||||
[INFO] - Uploading app-1.0.0.zip
|
||||
[INFO] - Uploading app-1.0.0.tar.gz
|
||||
[INFO] - Uploading checksums.txt
|
||||
[INFO] Preparing distributions
|
||||
[INFO] - Preparing app distribution
|
||||
@@ -79,7 +79,7 @@ $ jreleaser full-release
|
||||
[INFO] - Uploading app distribution
|
||||
[INFO] Announcing release
|
||||
[INFO] Announcing is not enabled. Skipping.
|
||||
[INFO] JReleaser succeeded after 3.007s
|
||||
[INFO] JReleaser succeeded after 0.894s
|
||||
[INFO] Writing output properties to out/jreleaser/output.properties
|
||||
----
|
||||
|
||||
|
||||
@@ -150,11 +150,11 @@ $ gradle jreleaseFullRelease
|
||||
[INFO] dryrun set to false
|
||||
[INFO] Generating changelog: out/jreleaser/release/CHANGELOG.md
|
||||
[INFO] Calculating checksums
|
||||
[INFO] [checksum] target/distributions/app/app-1.0.0.zip
|
||||
[INFO] Signing files
|
||||
[INFO] Signing is not enabled
|
||||
[INFO] Signing is not enabled. Skipping
|
||||
[INFO] Releasing to https://github.com/duke/app
|
||||
[INFO] - Uploading app-1.0.0.zip
|
||||
[INFO] - Uploading app-1.0.0.tar.gz
|
||||
[INFO] - Uploading checksums.txt
|
||||
[INFO] Preparing distributions
|
||||
[INFO] - Preparing app distribution
|
||||
@@ -164,8 +164,8 @@ $ gradle jreleaseFullRelease
|
||||
[INFO] - Uploading app distribution
|
||||
[INFO] Announcing release
|
||||
[INFO] Announcing is not enabled. Skipping.
|
||||
[INFO] JReleaser succeeded after 3.007s
|
||||
[INFO] Writing output properties to build/jreleaser/output.properties
|
||||
[INFO] JReleaser succeeded after 0.894s
|
||||
[INFO] Writing output properties to out/jreleaser/output.properties
|
||||
|
||||
--------------------------------------------------------------------
|
||||
1 projects CONF EXEC
|
||||
|
||||
@@ -227,11 +227,11 @@ $ mvn jreleaser:full-release
|
||||
[INFO] dryrun set to false
|
||||
[INFO] Generating changelog: out/jreleaser/release/CHANGELOG.md
|
||||
[INFO] Calculating checksums
|
||||
[INFO] [checksum] target/distributions/app/app-1.0.0.zip
|
||||
[INFO] Signing files
|
||||
[INFO] Signing is not enabled
|
||||
[INFO] Signing is not enabled. Skipping
|
||||
[INFO] Releasing to https://github.com/duke/app
|
||||
[INFO] - Uploading app-1.0.0.zip
|
||||
[INFO] - Uploading app-1.0.0.tar.gz
|
||||
[INFO] - Uploading checksums.txt
|
||||
[INFO] Preparing distributions
|
||||
[INFO] - Preparing app distribution
|
||||
@@ -241,8 +241,8 @@ $ mvn jreleaser:full-release
|
||||
[INFO] - Uploading app distribution
|
||||
[INFO] Announcing release
|
||||
[INFO] Announcing is not enabled. Skipping.
|
||||
[INFO] JReleaser succeeded after 3.007s
|
||||
[INFO] Writing output properties to target/jreleaser/output.properties
|
||||
[INFO] JReleaser succeeded after 0.894s
|
||||
[INFO] Writing output properties to out/jreleaser/output.properties
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user