Skip to content

Commit

Permalink
Generate Changelog - Release Automation: Add cloud build target for r…
Browse files Browse the repository at this point in the history
…elease builds (googleforgames#2884)

* Release target for cloud build job

* Added Cloudbuild File
* changing env variables
* changelog gen changes
* Handling CHANGELOG generation for both the release and RC
* Updating release document to incorporate new CHANGELOG generation make target
* Removed testing changes
* Updated release doc
* review changes
  • Loading branch information
mangalpalli authored Jan 10, 2023
1 parent 961d8ae commit 52889ee
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
9 changes: 9 additions & 0 deletions build/includes/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,12 @@ do-release: $(ensure-build-image)
git push -u upstream release-$(RELEASE_VERSION)

@echo "Now go make the $(RELEASE_VERSION) release on Github!"

ifdef RC_RELEASE
build-release: RELEASE_VERSION=$(base_version)-rc
else
build-release: RELEASE_VERSION=$(base_version)
endif
build-release:
cd $(agones_path) && gcloud builds submit . --substitutions _VERSION=$(RELEASE_VERSION) --config=./build/release/cloudbuild.yaml $(ARGS)

45 changes: 45 additions & 0 deletions build/release/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

steps:
- name: gcr.io/cloud-builders/gsutil
entrypoint: bash
args:
- '-c'
- 'gsutil mb $_STORAGE || true'
id: create-bucket
- name: ferrarimarco/github-changelog-generator:1.15.0
id: changelog
entrypoint: sh
args:
- '-c'
- 'github_changelog_generator --user=googleforgames --project=agones --bug-labels=kind/bug --enhancement-labels=kind/feature --breaking-labels=kind/breaking --security-labels=area/security --exclude-labels=duplicate,question,invalid,wontfix,priority/wontfix --future-release "v${_VERSION}" --release-branch=main --token $$GH_TOKEN'
secretEnv:
- GH_TOKEN
artifacts:
objects:
location: '$_STORAGE'
paths:
- 'CHANGELOG.md'
options:
machineType: E2_HIGHCPU_32
dynamic_substitutions: true
substitutions:
_STORAGE: gs://${PROJECT_ID}-agones-releases
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/release-github-token/versions/latest
env: GH_TOKEN
timeout: 1800s

6 changes: 4 additions & 2 deletions docs/governance/templates/release_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] If release candidate add the label `feature-freeze-do-not-merge` to any feature pull requests.
- [ ] `git checkout main && git pull --rebase upstream main`
- [ ] If full release, run `make release-deploy-site`
- [ ] Run `make gen-changelog` to generate the CHANGELOG.md (if release candidate
`make gen-changelog RELEASE_VERSION={version}-rc`). You will need your
- [ ] Run `make build-release` to generate the CHANGELOG.md (if release candidate
`RC_RELEASE=1 make build-release`). You will need your
[GitHub Personal Access Token](https://github.com/settings/tokens) for this.
- [ ] Download all the artifacts from the cloud build.
- [ ] Move the CHANGELOG.md to the root of this repository, replacing any previous versions.
- [ ] Ensure the [helm `tag` value][values] is correct (should be {version} if a full release, {version}-rc if release candidate)
- [ ] Ensure the [helm `Chart` version values][chart] are correct (should be {version} if a full release, {version}-rc if release candidate)
- [ ] Update SDK Package Versions
Expand Down

0 comments on commit 52889ee

Please sign in to comment.