Skip to content

Commit

Permalink
📌 v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasScholzTW committed Feb 13, 2021
1 parent 0850b18 commit 73fbe0a
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 11 deletions.
25 changes: 14 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
79 changes: 79 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=<put_github_token>'"
@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
28 changes: 28 additions & 0 deletions _docs/changelogs/CHANGELOG.template.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions _docs/changelogs/CHANGELOG.v0.2.0.md
Original file line number Diff line number Diff line change
@@ -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.
32 changes: 32 additions & 0 deletions _docs/changelogs/CHANGELOG.v0.3.0.md
Original file line number Diff line number Diff line change
@@ -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.
35 changes: 35 additions & 0 deletions _docs/changelogs/CHANGELOG.v0.4.0.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions _docs/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release Workflow

The process makes use of the steps described [here](https://github.com/MatthiasScholz/demo_github_release).

0 comments on commit 73fbe0a

Please sign in to comment.