|
| 1 | +# Releasing Online Boutique |
| 2 | + |
| 3 | +This document walks through the process of creating a new release of Online Boutique. |
| 4 | + |
| 5 | +## Creating a new release |
| 6 | + |
| 7 | +1. Decide on the next release version number using [semantic versioning](https://semver.org/), based on the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main). |
| 8 | + |
| 9 | +2. Open a new terminal. |
| 10 | + |
| 11 | +3. Make sure you have `gsed` installed. If not, `brew install gnu-sed`. |
| 12 | + |
| 13 | +4. Set the following environment variables: |
| 14 | + |
| 15 | + - `TAG` - This is the new version (e.g., `v0.3.5`). |
| 16 | + - `REPO_PREFIX` - This is the Docker repository. |
| 17 | + |
| 18 | + **Example:** |
| 19 | + |
| 20 | + ``` |
| 21 | + export TAG=v0.3.5 |
| 22 | + export REPO_PREFIX=gcr.io/google-samples/microservices-demo |
| 23 | + ``` |
| 24 | + |
| 25 | +5. Run `./docs/releasing/make-release.sh`. |
| 26 | + |
| 27 | + - Make sure you run `./docs/releasing/make-release.sh` from this project's root directory — **not** from inside the `docs/releasing/` directory. |
| 28 | + - This script: |
| 29 | + 1. uses `make-docker-images.sh` to build and push a Docker image for each microservice to the previously specified repository. |
| 30 | + 1. uses `make-release-artifacts.sh` to regenerates (and update the image $TAGS) YAML file at `./release/kubernetes-manifests.yaml` and `./kustomize/base/`. |
| 31 | + 1. runs `git tag` and pushes a new branch (e.g., `release/v0.3.5`) with the changes to `./release/kubernetes-manifests.yaml`. |
| 32 | + |
| 33 | +6. Make sure the new Docker images were created and pushed. |
| 34 | + |
| 35 | + - Go through [our Container Registry repository](https://pantheon.corp.google.com/gcr/images/google-samples/global/microservices-demo?project=google-samples). |
| 36 | + - Make sure a Docker image was created for each microservice (with the new version tag). |
| 37 | + |
| 38 | +7. [Draft a new release on GitHub](https://github.com/GoogleCloudPlatform/microservices-demo/releases). |
| 39 | + |
| 40 | + - Summarize the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main). |
| 41 | + - See previous releases for inspiration on release notes. |
| 42 | + |
| 43 | +8. Create a new pull-request. |
| 44 | + |
| 45 | + - When you ran `make-release.sh`, it created a new branch (e.g., `release/v0.3.5`). |
| 46 | + - Include the new release draft in the pull-request description for reviewers to see. |
| 47 | + |
| 48 | +9. Once your pull-request is approved, merge it. |
| 49 | + |
| 50 | +10. Connect to our [online-boutique-release GKE cluster](https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-c/online-boutique-release/details?project=online-boutique-ci). |
| 51 | + |
| 52 | + ``` |
| 53 | + gcloud container clusters get-credentials online-boutique-release \ |
| 54 | + --zone us-central1-c --project online-boutique-ci |
| 55 | + ``` |
| 56 | + |
| 57 | +11. Deploy `release/kubernetes-manifests.yaml` to our [online-boutique-release GKE cluster](https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-c/online-boutique-release/details?project=online-boutique-ci). |
| 58 | + |
| 59 | + ``` |
| 60 | + kubectl apply -f ./release/kubernetes-manifests.yaml |
| 61 | + ``` |
| 62 | + |
| 63 | +12. Make sure [onlineboutique.dev](https://onlineboutique.dev) works. |
| 64 | + |
| 65 | +13. [Publish your draft release on GitHub](https://github.com/GoogleCloudPlatform/microservices-demo/releases). |
0 commit comments