Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

How to release minimesos

Frank Scholten edited this page Aug 5, 2016 · 5 revisions

Configure your machine

Add the following properties to ~/.gradle/gradle.properties

  • githubAuthToken
  • awsMinimiesosOrgApiKey

The githubAuthToken value is used to create Github releases and tags. The awsMinimesosOrgApiKey is an API KEY for triggering a minimesos.org update build on AWS.

Build & Smoke test

Do a build, copy minimesos to a temporary folder and test if you init, up and destroy a cluster.

Release task

To release run the following command

$ ./gradlew release

This task performs the following actions

Commit

This will perform two git commits:

image

The first commit updates the bin/minimesos script

image

Increment version

The release build writes the next version of the project to gradle.properties in the root of the minimesos repository.

Tag

After that the code is tagged. The second commit happens after the code is tagged and it reverts update in bin/minimesos and sets new version in gradle.properties

image

Push and tag Docker images

The release task also tags and pushes minimesos image to Docker Hub

Pushing containersol/minimesos:0.9.2 docker image to Docker Hub...
Pushing containersol/minimesos:latest docker image to Docker Hub...

Implementation Details

net.researchgate.release Gradle plugin is used to orchestrate the build. Applying this plugin adds the following tasks (in the order of their execution)

  • release - Verify project, release, and update version to next.
  • createScmAdapter - Finds the correct SCM plugin
  • initScmAdapter - Initializes the SCM plugin
  • checkCommitNeeded - Checks to see if there are any added, modified, removed, or un-versioned files.
  • checkUpdateNeeded - Checks to see if there are any incoming or outgoing changes that haven't been applied locally.
  • unSnapshotVersion - Removes "-SNAPSHOT" from your project's current version.
  • confirmReleaseVersion - Prompts user for this release version. Allows for alpha or pre releases.
  • checkSnapshotDependencies - Checks to see if your project has any SNAPSHOT dependencies.
  • runBuildTasks - Runs the build process in a separate gradle run.
  • beforeReleaseBuild - Runs immediately before the build when doing a release
  • afterReleaseBuild - Runs immediately after the build when doing a release
  • preTagCommit - Commits any changes made by the Release plugin - eg. If the unSnapshotVersion tas was executed
  • createReleaseTag - Creates a tag in SCM for the current (un-snapshotted) version.
  • updateVersion - Prompts user for the next version. Does it's best to supply a smart default
  • commitNewVersion - Commits the version update to your SCM

Specific tasks are attached to some of these tasks as their dependencies. Most of these tasks are implemented by executing shell commands.