= Buildkite

You can setup your own link:https://buildkite.com[Buildkite] agents.

NOTE: If you're already building with either Maven or Gradle then you might use the
xref:tools:jreleaser-maven.adoc[] or the xref:tools:jreleaser-gradle.adoc[] instead.

For Linux and MacOS agents:

[source,yaml]
.pipeline.yml
----
steps:
  - label: Build
    command: mvn verify

  - label: Release
    command: |
      # Get the jreleaser downloader
      curl -sL https://git.io/get-jreleaser > get_jreleaser.java
      # Download JReleaser with version = <version>
      # Change <version> to a tagged JReleaser release
      # or leave it out to pull `latest`.
      java get_jreleaser.java <version>
      # Let's check we've got the right version
      java -jar jreleaser-cli.jar --version
      # Execute a JReleaser command such as 'full-release'
      java -jar jreleaser-cli.jar full-release
----

TIP: You may use `latest` to pull the latest stable release or `early-access` to pull the latest snapshot.

IMPORTANT: The agent must have Java 11 or greater configured otherwise the download will fail. You may setup Java using
link:https://sdkman.io[SdkMan!] or link:https://github.com/shyiko/jabba[Jabba].

NOTE: You must use link:https://buildkite.com/docs/pipelines/secrets[Pipeline Secrets] to hide all environment
variables that provide private/sensitive information.
