Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Automatic Continuous Delivery from CI server #103

Merged
merged 4 commits into from
Sep 23, 2020
Merged

Automatic Continuous Delivery from CI server #103

merged 4 commits into from
Sep 23, 2020

Conversation

szpak
Copy link
Collaborator

@szpak szpak commented Sep 18, 2020

Automatic Continuous Delivery from CI server

This PR add an ability to automatically release the new version of embedded-consul to Maven Central from CI server, on demand. By the automation of the all manual steps needed to be performed on a local workstation, it opens an ability to release the new version every time the new features or fixes are in master.

Introduction

The release process has been implemented with the CDeliveryBoy, a Continuous Delivery plugin for Gradle. It greatly simplifies the configuration required for CD in a project, by providing sane defaults, whenever possible.

Features

Releasing

Assuming we are in master:

git commit -m "Trigger build" -m "[#DO_RELEASE]" --allow-empty
git push

and wait a few (or maybe several) minutes - doing push-ups or other healthy activities - to see the artifacts in Maven Central!

Btw, [#DO_RELEASE] can be also added to the commit with a new feature or a bug to trigger the release after push.

Releasing an arbitrary version number

[#DO_RELEASE] is configured to release the new version with incremented patch number (e.g. 1.1.5 -> 1.1.6). However, CDeliveryBoy has a sophisticated mechanism to release an arbitrary version:

  • [#DO_RELEASE][#MAJOR] - increase major version number
  • [#DO_RELEASE][#MINOR] - increase minor version number
  • [#DO_RELEASE][#PATCH] - increase patch version number (currently done by default)
  • [#DO_RELEASE][#2.3.4] - provided version number (compatible with Semantic versioning)

Changelog synchronisation with GitHub releases

As a bonus feature the locally provided changelog is synchronized with GitHub releases, which is very convenient for people receiving notification about new versions (e.g. with GitPunch).

Version update in README

As a part of release process the versions used in example configuration of the project in Gradle and Maven are automatically updated. No more manual version changes in README :-).

Limitations

CDeliveryBoy has been created by Marcin Zajączkowski to be used in his FOSS projects. It is currently used in multiple projects, however, it was not intended to be a general usage CD tool for everyone. As a result, it is currently in the maintenance mode with some known limitations.

No support for maven-publish plugin

CDeliveryBoy uses the maven plugin which currently is deprecated. As a result it might be problematic to build the project with Gradle 7+.

Additional info

The changes are separated into 4 commits to make it easier to analyze applied changes. I recommend to merge with WITHOUT squashing to preserve it for further analysis.

Fixed #95, fixes #37.

@szpak szpak changed the title Automatic Continuous Delivery from CI server WIP: Automatic Continuous Delivery from CI server Sep 18, 2020
@szpak szpak changed the title WIP: Automatic Continuous Delivery from CI server Automatic Continuous Delivery from CI server Sep 18, 2020
@pszymczyk pszymczyk merged commit d283054 into master Sep 23, 2020
@szpak szpak mentioned this pull request Sep 23, 2020
@szpak szpak added this to the 2.2.0 milestone Sep 23, 2020
@szpak szpak deleted the cicd branch October 6, 2020 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/CD Release process Missing Changelog or release notes
2 participants