diff --git a/docs/governance/release.md b/docs/governance/release.md new file mode 100644 index 000000000000..43e022331ea4 --- /dev/null +++ b/docs/governance/release.md @@ -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! + + + diff --git a/tools/release_prepare.sh b/tools/release_prepare.sh index cdd80085d5ab..7c9ffe38f0bd 100755 --- a/tools/release_prepare.sh +++ b/tools/release_prepare.sh @@ -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 @@ -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 "######################################################################################################"