Skip to content

Commit

Permalink
adding the beginnings of the release doc with steps, fixing a bug in …
Browse files Browse the repository at this point in the history
…the release_prepare.sh script and tweaking the output based on the current process.
  • Loading branch information
slim-bean committed Aug 20, 2019
1 parent ce945b4 commit 52efdfd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
33 changes: 33 additions & 0 deletions docs/governance/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Releasing Loki

## How To Perform a Release

* Create a new branch for updating changelog and version numbers
* In the changelog, set the version number and release date, create the next release as (unreleased) as a placeholder for people to add notes to the changelog
* List all the merged PR's since the last release, this command is helpful for generating the output: `curl https://github.com/gitapi/search/issues?q=repo:grafana/loki+is:pr+"merged:>=2019-08-02" | jq -r ' .items[] | "* [" + (.number|tostring) + "](" + .html_url + ") **" + .user.login + "**: " + .title'`

> Until [852](https://github.com/grafana/loki/issues/852) is fixed, updating the Helm and Ksonnet configs has to wait until after the release tag is pushed so that the Helm tests will pass.
* Merge the changelog PR
* Run:

**Note: This step creates the tag and therefore the release, this will trigger CI to build release artifacts (binaries and images) as well as publish them. As soon as this tag is pushed when CI finishes the new release artifacts will be available to the public**

```https://github.com/grafana/loki/releases
git pull
git tag -s v0.2.0 -m "tagging release v0.2.0"
git push origin v0.2.0
```

* After the builds finish, run:

```
make release-prepare
```

* Set the release version and in most cases the auto selected helm version numbers should be fine.
* Commit to another branch, make a PR and get merge it.
* Go to github and finish manually editing the auto generated release template and publish it!



14 changes: 3 additions & 11 deletions tools/release_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ if [[ "${CONTINUE}" != "y" ]]; then
fi

echo "Updating helm and ksonnet image versions"
sed -i '' "s/.*promtail:.*/ promtail: '\''grafana\/promtail:${VERSION}'\'',/" production/ksonnet/promtail/config.libsonnet
sed -i '' "s/.*loki:.*/ loki: '\''grafana\/loki:${VERSION}'\'',/" production/ksonnet/loki/images.libsonnet
sed -i '' "s/.*promtail:.*/ promtail: 'grafana\/promtail:${VERSION}',/" production/ksonnet/promtail/config.libsonnet
sed -i '' "s/.*loki:.*/ loki: 'grafana\/loki:${VERSION}',/" production/ksonnet/loki/images.libsonnet
sed -i '' "s/.*tag:.*/ tag: ${VERSION}/" production/helm/loki/values.yaml
sed -i '' "s/.*tag:.*/ tag: ${VERSION}/" production/helm/promtail/values.yaml

Expand All @@ -65,16 +65,8 @@ sed -i '' "s/^appVersion:.*/appVersion: ${VERSION}/" production/helm/loki-stack/

echo
echo "######################################################################################################"
echo "NEXT STEPS"
echo
echo "Verify the changes, then commit and push and get them merged to master"
echo "Version numbers updated, create a new branch, commit and push"
echo
echo "Once merged to master"
echo
echo "git pull"
echo "git tag -a ${VERSION} -m \"tagging release ${VERSION}\""
echo "git push origin ${VERSION}"
echo
echo "This should initiate the CircleCI build to push the images and finish the release"
echo "######################################################################################################"

0 comments on commit 52efdfd

Please sign in to comment.