Release Droid provides advanced support for the following languages:
- Java
- Scala
A repository with any other language should be marked as Generic
, see
- CLI parameter
--language generic
or - entry
language: Generic
in configuration filerelease_config.yml
The following list contains the platforms on which the Release Droid can perform a release:
- GitHub
- Maven Central Repository (Java only)
- Exasol Jira
Your project must fulfil the criteria listed in this section — depending on a programming language you use and platforms you want to release to.
- Currently, Release Droid only supports the GitHub-based projects. So the first essential requirement: the project must be uploaded to the GitHub.
- The project must contain a
/.github/workflows/release_droid_prepare_original_checksum.yml
file to run project tests and prepare a checksum. Please check templates. - The project must contain a
/.github/workflows/release_droid_print_quick_checksum.yml
file to run project tests and prepare a checksum. Please check templates. - The project must have a valid version number consisting of three parts:
[v]<major version>.<minor version>.<bug fix version>
. The version can contain a leadingv
. - You need a GitHub account.
- You need to create a GitHub OAuth token. For that:
- Go to
Settings
→Developer Settings
→Personal access tokens
→Generate new token
- Select scope
repo:status
andpublic_repo
- Then create a token
- Go to
- The project must contain files
changelog.md
andchanges_<version>.md
in the following directory:
project root/
`- doc/
`- changes/
|- changelog.md
`- changes_<version>.md
- The user must create a new file
changes_<version>.md
for each new release. Thechanges_<version>.md
must contain:- Header in the following format:
# <Project name> <version>, released yyyy-mm-dd
- Description of the release changes.
- Header in the following format:
- The
changelog.md
must contain a link to thechanges_<version>.md
file.
-
The project must be a valid Maven project.
-
The
pom.xml
file must contain:- a
<version></version>
tag with a valid version as a constant <artifactId></artifactId>
tag with a project name
- a
- The project must be built with sbt.
- The project must contain file
plugins.sbt
specifying withmoduleName
andversion
. You can create the file starting with a copy of RD's template. - The project must include plugin
sbt-reproducible-builds
version 0.25 or later. Please add the plugin to theplugins.sbt
file:
addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.25")
Also, you need to enable the plugin in file build.sbt
.
- If the GitHub repository's releases page is not empty, the new release version must follow the versioning rules. Release Droid does not allow to
- skip a version
- to release the same version twice or
- to release a version lower than the latest release.
- Files
changes_<version>.md
must contain- a line starting with
Code name:
- followed by a GitHub release header.
- This line should appear between the file's header and the first section describing the changes.
- one or more GitHub ticket numbers in the following format:
#1:<comment>
.- All the mentioned on the file tickets must have a closed status on the GitHub.
- a line starting with
- (Optional) For uploading assets to the release, the project must contain a file
/.github/workflows/release_droid_upload_github_release_assets.yml
. Please check templates.
Pre-requisites:
- The repository must be on the while-list of the organizational credential for Maven Central on the GitHub.
Rules:
- The project must contain a
/.github/workflows/release_droid_release_on_maven_central.yml
file in the root directory. Please check a template. - The Maven file must contain all necessary plugins and settings. Please check a template.
- The release on the GitHub is a pre-requisite for the Jira release. Please, be aware that the GitHub and Jira releases must be made on the same machine because RD will search for the release state stored on the machine.
- You need to provide Jira credentials either by manual input or in configuration file
~/.release-droid/credentials
.
If you want to reduce the number of keystrokes required to run release droid you can provide credentials and some of the command line options in some configuration files.
If you create this file in your home directory then release droid will read credentials for GitHub and Jira from this file. This way you no longer need to manually enter the credentials into the terminal each time you want to run release droid.
On Windows RD expects the file at C:\Users\<username>\.release-droid\credentials
.
Sample content:
github_username=<your github username>
github_oauth_access_token=<github access token>
jira_username=<your jira user name>
jira_password=<jira password>
The lines with prefix "jira" are only relevant if releasing to platform Jira.
If you want RD to generate a Release Guide then you might want to add additional entries.
If RD cannot find this file during runtime, it asks the user to input the credentials directly through terminal.
We recommend restricting access to this file for security purposes:
chmod u-x,g-rwx,o-rwx "$HOME"/.release-droid/credentials
In case RD reports access "forbidden" when accessing Jira you might need to change your Jira password:
- Try to avoid special characters
- Use short password, i.e. not longer than 12 characters
If you create this file in the directory of your project then release droid will read platforms and programming language from it.
release-platforms:
- GitHub
- Maven
- Jira
language: Java
Section Release Guide describes optional additional entries.
- JRE 11 or higher
-
Download the latest available release of Release Droid.
-
Optionally create the configuration files described above.
In case RD reports access "forbidden" when accessing Jira you might need to change your Jira password:
- Try to avoid special characters
- Use short password, i.e. not longer than 12 characters
-
Run Release Droid from a terminal:
java -jar release-droid-1.5.2.jar -name <project name> -goal <goal> -platforms <comma-separated list of platforms>
For example:
java -jar release-droid-1.5.2.jar -name virtual-schema-common-java -goal validate -platforms github
(Optional) Windows: You can simplify this by creating a
release-droid.bat
file containing the following contentsjava -jar C:\tools\release-droid-1.5.2.jar %*
. Make sure you use the full path for the .jar file and don't forget to include the location of your new batch file in your PATH so you can always access it from your CLI. You can just use the name of the .bat file you created from then on e.g.:release-droid -name virtual-schema-common-java -goal validate ...
Long Option | Short Option | Mandatory | Description | Possible values |
---|---|---|---|---|
-branch | -b | No | Git branch to work with (only for validate goal) |
A valid git branch name |
-goal | -g | No | Goal to execute. validate is a default goal. |
validate , release |
-help | -h | No | Prints help | |
-language | -lg | No | Specify repository language if not auto-detected | java , scala , generic |
-local | -l | No | Path to the repository root directory | A valid repository root directory path |
-name | -n | Yes | GitHub project name | A valid GitHub project name |
-platforms | -p | No | Comma-separated list of release platforms. (*) | github , maven , jira |
-skipvalidation | No | Only valid with release goal. Use in emergency cases. |
||
-release-guide | -guide | No | Path to write the Release Guide to | Valid path to a file, may exist already |
(*) There are two ways to specify multiple platforms via CLI:
-p github -p maven
-p github,maven
(This is a deprecated way, which is going to be removed in future)
Please also note the option to specify the platforms in the configuration file release_config.yml
validate
- check if the repository is ready to be released. Runs on default branch if--branch
is not provided.release
- validate and immediately start the release process. Only runs on the default branch.
Making releases still requires time, effort, and often stereotype tasks. Depending on the project to release the user needs to aggregate data from various sources and type it into different documents and publications. Release Droid therefore provides a document guiding the user through the release process to make releasing as convenient as possible.
Upon command line option -guide
or --release-guide
RD generates an HTML page containing the release guide.
The user can open the document in a web browser, follow the described steps, and copy the data for release checklist, team planning, and announcement to chat channels.
RD collects the data from various sources:
Source | Location | Retrieved information | Key |
---|---|---|---|
project-overview/projects.yaml |
GitHub | Target audience | |
file release_config.yml |
project's repository | Maven URLs | maven-artifacts |
file error_code_config.yml |
project's repository | Short tag for team planning page | See error-code-crawler-maven-plugin for details |
file doc/changes/changes_<version>.md |
project's repository | Release summary | ## Summary |
file ~/.release-droid/credentials |
user's home directory | URLs for announcing the release | See section URLs for Announcing the Release |
If your project is published to Maven Central (i.e. file release_config.yml
mentions platform Maven
) then RD also adds an appropriate link to the release guide.
By default RD generates the link based on the name of the project's repository. In case your project generates multiple Maven artifacts you need to specify their names in file release_config.yml
:
maven-artifacts:
- exasol/project-keeper-cli
- exasol/project-keeper-maven-plugin
In file ~/.release-droid/credentials
you can add the following keys and assign a URL to each of them
Key | Value: URL of |
---|---|
release_checklists |
Release checklists page |
team_planning |
Team planning page current quarter in company wiki |
team_channel |
Channel for announcing new releases to team in company chat tool |
customer_channel |
Channel for announcing new releases to customers in company chat tool |
announce_prefix |
Introduction for your announcement, e.g. "I am happy to announce" or "I just released" |
When generating the release guide RD will use these URLs and the introduction in the generated HTML file.
Additional sample content in file ~/.release-droid/credentials
:
release_checklists=https://intranet....
team_planning=https://intranet....
team_channel=https://channel....
customer_channel=https://channel...
announce_prefix=I am happy to announce
If you need to debug RD, you can adjust the Java log level in file src/main/resources/logging.properties
. The default level used by release droid is INFO
.
While making a new release instead of redoing a release, sometimes you can be forced to. E.g. in cases where people depend on a certain version that later turns out to be incomplete. In such cases:
- Remove all deployed artifacts from the platforms by hand (e.g. GH release and tag)
- Remove the local status file of the release from
~/.release-droid/state/
- Restart the release