From 73fbe0a2ce053c0a0e8dc2e63323644bc600fa49 Mon Sep 17 00:00:00 2001 From: Matthias Scholz Date: Sat, 13 Feb 2021 15:12:13 +0100 Subject: [PATCH] :pushpin: v0.4.0 --- CHANGELOG.md | 25 ++++---- Makefile | 79 ++++++++++++++++++++++++++ _docs/changelogs/CHANGELOG.template.md | 28 +++++++++ _docs/changelogs/CHANGELOG.v0.2.0.md | 21 +++++++ _docs/changelogs/CHANGELOG.v0.3.0.md | 32 +++++++++++ _docs/changelogs/CHANGELOG.v0.4.0.md | 35 ++++++++++++ _docs/release.md | 3 + 7 files changed, 212 insertions(+), 11 deletions(-) create mode 100644 _docs/changelogs/CHANGELOG.template.md create mode 100644 _docs/changelogs/CHANGELOG.v0.2.0.md create mode 100644 _docs/changelogs/CHANGELOG.v0.3.0.md create mode 100644 _docs/changelogs/CHANGELOG.v0.4.0.md create mode 100644 _docs/release.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b16c9c..d80a05b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,23 @@ # Changelog -## v0.2.0 (2019-10-21) +## v0.0.1 (2018-04-30) -- **major (incompatible)**, Refactor: With [#70](https://github.com/MatthiasScholz/cos/issues/70) the cos module was upgraded to be compatible to terraform 0.12.0. - - Furthermore the depending modules where upgraded as well: - - terraform-aws-consul from [v0.3.1](https://github.com/hashicorp/terraform-aws-consul/tree/v0.3.1) to [v0.7.0](https://github.com/hashicorp/terraform-aws-consul/tree/v0.7.0) - - terraform-aws-nomad from [v0.4.5](https://github.com/hashicorp/terraform-aws-nomad/tree/v0.4.5) to [v0.5.0](https://github.com/hashicorp/terraform-aws-nomad/tree/v0.5.0) -- License: With [9156e49](https://github.com/MatthiasScholz/cos/commit/9156e49f0eabbfc50100aeb778e6a776ba376b96) the license model was changed from GPL to LGPL, a more relaxed one. -- Test: With PR [#68](https://github.com/MatthiasScholz/cos/pull/68) tests (terratest) where added to ensure functionality of the COS. +## v0.0.2 (2018-12-13) -## v0.1.1 (2019-07-20) +## v0.0.3 (2019-01-01) ## v0.1.0 (2019-06-14) -## v0.0.3 (2019-01-01) +## v0.1.1 (2019-07-20) -## v0.0.2 (2018-12-13) +## v0.2.0 (2021-02-13) -## v0.0.1 (2018-04-30) +- [release notes](_docs/changelogs/CHANGELOG.v0.2.0.md) + +## v0.3.0 + +- [release notes](_docs/changelogs/CHANGELOG.v0.3.0.md) + +## v0.4.0 (2021-02-13) + +- [release notes](_docs/changelogs/CHANGELOG.v0.4.0.md) diff --git a/Makefile b/Makefile index 82bd378..3533084 100644 --- a/Makefile +++ b/Makefile @@ -2,3 +2,82 @@ test: cd test && make all + +###################################################################### +# Release Management +# Taken from: https://github.com/MatthiasScholz/demo_github_release +###################################################################### +# NOTE Should be set when calling make +token_github := +release_version ?= v0.4.0 + +# Extracting version information from the repository +fabio_file := examples/jobs/fabio.nomad +packer_file := modules/ami2/nomad-consul-docker-ecr.json + +release_branch := releases/$(release_version) +today := `date +'%Y-%m-%d'` +release_notes_template := _docs/changelogs/CHANGELOG.template.md +release_notes_file := _docs/changelogs/CHANGELOG.$(release_version).md +release_title := "$(release_version) ($(today))" +# Extracting the information from the actual files in use +version_nomad := `cat $(packer_file) | jq '.variables.nomad_version' | tr -d '"'` +version_consul := `cat $(packer_file) | jq '.variables.consul_version' | tr -d '"'` +version_fabio := `cat $(fabio_file) | grep releases | sed -n "s/.*v\([0-9.]*\).*/\1/p"` +version_terraform := `grep --recursive --include=\*.tf "required_version" ./examples/root-example | sed -n "s/.* \([0-9.]*\).*/\1/p" | uniq` +version_tf_nomad := `grep --recursive --include=\*.tf "terraform-aws-nomad.git" ./modules | sed -n "s/.*v\([0-9.]*\).*/\1/p" | uniq` +version_tf_consul := `grep --recursive --include=\*.tf "terraform-aws-consul.git" ./modules | sed -n "s/.*v\([0-9.]*\).*/\1/p" | uniq` + +release: release-commit release-push release-github +test-release: release-notes release-commit release-push release-github + +# NOTE Ensure existing files are not overwritten +release-notes: $(release_notes_file) +$(release_notes_file): + @echo "INFO :: Writting the Changelog: '$(release_notes_file)'" + release_date=$(today) \ + release_version=$(release_version) \ + version_nomad=$(version_nomad) \ + version_consul=$(version_consul) \ + version_fabio=$(version_fabio) \ + version_terraform=$(version_terraform) \ + version_tf_nomad=$(version_tf_nomad) \ + version_tf_consul=$(version_tf_consul) \ + consul-template -once -template="$(release_notes_template):$(release_notes_file)" + + @echo "INFO :: Adding release to 'CHANGELOG.md'" + @echo "" >> CHANGELOG.md + @echo "## $(release_version) ($(today))" >> CHANGELOG.md + @echo "" >> CHANGELOG.md + @echo "- [release notes]($(release_notes_file))" >> CHANGELOG.md + +release-commit: + @git add . + git commit -m ":pushpin: $(release_version)" + +release-github: + gh release create $(release_version) --draft --prerelease --title $(release_title) --notes-file $(release_notes_file) --target $(release_branch) + @gh release list + +release-push: + git push origin main + @git branch $(release_branch) + git push origin $(release_branch) + +gh-login: +ifeq ($(strip $(token_github)),) + @echo "ERROR :: No github token given. Please call 'make' like this: 'make token_github='" + @exit 1 +endif + echo $(token_github) | gh auth login --with-token + gh auth status + +setup: + brew install consul-template + brew install gh + consul-template -version + gh version + +uninstall: + brew uninstall consul-template + brew uninstall gh diff --git a/_docs/changelogs/CHANGELOG.template.md b/_docs/changelogs/CHANGELOG.template.md new file mode 100644 index 0000000..da3ce8b --- /dev/null +++ b/_docs/changelogs/CHANGELOG.template.md @@ -0,0 +1,28 @@ +# Overview + +- Release date: {{ env "release_date" }} + +## Changes + +- + +## Included Versions + +- nomad: {{ env "version_nomad" }} +- consul: {{ env "version_consul" }} +- fabio: {{ env "version_fabio" }} +- terraform: {{ env "version_terraform" }} + +### Terraform Modules + +- terraform-aws-nomad: {{ env "version_tf_nomad" }} +- terraform-aws-consul: {{ env "version_tf_consul" }} + +## Release Branch + +- releases/{{ env "release_version" }} + +## Disclaimer + +Do not use the out of the box configuration for your production setup +especially security and cluster access needs to be restricted better. diff --git a/_docs/changelogs/CHANGELOG.v0.2.0.md b/_docs/changelogs/CHANGELOG.v0.2.0.md new file mode 100644 index 0000000..7ea41e8 --- /dev/null +++ b/_docs/changelogs/CHANGELOG.v0.2.0.md @@ -0,0 +1,21 @@ +# Overview + +- Release date: 2019-10-21 + +## Changes + +- **major (incompatible)**, Refactor: With [#70](https://github.com/MatthiasScholz/cos/issues/70) the cos module was upgraded to be compatible to terraform 0.12.0. + - Furthermore the depending modules where upgraded as well: + - terraform-aws-consul from [v0.3.1](https://github.com/hashicorp/terraform-aws-consul/tree/v0.3.1) to [v0.7.0](https://github.com/hashicorp/terraform-aws-consul/tree/v0.7.0) + - terraform-aws-nomad from [v0.4.5](https://github.com/hashicorp/terraform-aws-nomad/tree/v0.4.5) to [v0.5.0](https://github.com/hashicorp/terraform-aws-nomad/tree/v0.5.0) +- License: With [9156e49](https://github.com/MatthiasScholz/cos/commit/9156e49f0eabbfc50100aeb778e6a776ba376b96) the license model was changed from GPL to LGPL, a more relaxed one. +- Test: With PR [#68](https://github.com/MatthiasScholz/cos/pull/68) tests (terratest) where added to ensure functionality of the COS. + +## Release Branch + +- releases/v0.2.0 + +## Disclaimer + +Do not use the out of the box configuration for your production setup +especially security and cluster access needs to be restricted better. diff --git a/_docs/changelogs/CHANGELOG.v0.3.0.md b/_docs/changelogs/CHANGELOG.v0.3.0.md new file mode 100644 index 0000000..3bb4412 --- /dev/null +++ b/_docs/changelogs/CHANGELOG.v0.3.0.md @@ -0,0 +1,32 @@ +# Overview + +- Release date: 2020-01-06 + +## Changes + +### Overview + +This release is basically a software update of nomad and consul. + +With the release of nomad v0.10.0 Consul Connect was further integrated into nomad. This release should provide the basis to test the service mesh functionality. + +## Included Versions + +- nomad: 0.10.2 +- consul: 1.6.2 +- fabio: 1.5.13 +- terraform: 0.12.0 + +### Terraform Modules + +- terraform-aws-nomad: 0.5.0 +- terraform-aws-consul: 0.7.3 + +## Release Branch + +- releases/v0.3.0 + +## Disclaimer + +Do not use the out of the box configuration for your production setup +especially security and cluster access needs to be restricted better. diff --git a/_docs/changelogs/CHANGELOG.v0.4.0.md b/_docs/changelogs/CHANGELOG.v0.4.0.md new file mode 100644 index 0000000..bf0683b --- /dev/null +++ b/_docs/changelogs/CHANGELOG.v0.4.0.md @@ -0,0 +1,35 @@ +# Overview - Nomad 1.0.2 + +- Release date: 2021-02-13 + +## Changes + +- :tada: Upgrade of all dependencies. +- :construction_worker: Automation of the release process. + +### Incompatilbe Changes + +- Replace SSH access with AWS System Manager Session Manager (AWS SSM) + as default configuration to access the instances in the [examples](../../examples) folder. + This DOES NOT decrease the functionality of the terraform modules usage itself. + +## Included Versions + +- nomad: 1.0.2 +- consul: 1.9.3 +- fabio: 1.5.15 +- terraform: 0.14 + +### Terraform Modules + +- terraform-aws-nomad: 0.7.2 +- terraform-aws-consul: 0.8.4 + +## Release Branch + +- releases/v0.4.0 + +## Disclaimer + +Do not use the out of the box configuration for your production setup +especially security and cluster access needs to be restricted better. diff --git a/_docs/release.md b/_docs/release.md new file mode 100644 index 0000000..42ae621 --- /dev/null +++ b/_docs/release.md @@ -0,0 +1,3 @@ +# Release Workflow + +The process makes use of the steps described [here](https://github.com/MatthiasScholz/demo_github_release).