Skip to content

Commit 07b7495

Browse files
committed
Add metadata.yaml for defining contracts
1 parent b470408 commit 07b7495

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ release: clean-release ## Builds and push container images using the latest git
352352
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent
353353
$(MAKE) release-manifests
354354
$(MAKE) release-templates
355+
$(MAKE) release-metadata
355356

356357
.PHONY: release-manifests
357358
release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publish with a release
@@ -361,6 +362,10 @@ release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publis
361362
release-templates: $(RELEASE_DIR)
362363
cp templates/cluster-template* $(RELEASE_DIR)/
363364

365+
.PHONY: release-metadata
366+
release-metadata: $(RELEASE_DIR)
367+
cp metadata.yaml $(RELEASE_DIR)/metadata.yaml
368+
364369
.PHONY: release-binary
365370
release-binary: $(RELEASE_DIR)
366371
docker run \

docs/releasing.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Release Process
22

3-
## Change milestone
4-
- Change milestone applier so new changes can be applied to the appropriate release
3+
## Change milestone
4+
- Change milestone applier so new changes can be applied to the appropriate release
55
- Open a PR in https://github.com/kubernetes/test-infra to change this [line](https://github.com/kubernetes/test-infra/blob/25db54eb9d52e08c16b3601726d8f154f8741025/config/prow/plugins.yaml#L344)
66
- Example PR: https://github.com/kubernetes/test-infra/pull/16827
77

@@ -10,30 +10,31 @@
1010
- Fast-forward the release branch to the selected commit. Always release from the release branch and not from master!
1111
- `git fetch upstream`
1212
- `git merge --ff-only upstream/master`
13-
- Create tag with git
13+
- Create tag with git
1414
- `export RELEASE_TAG=v0.4.6` (the tag of the release to be cut)
1515
- `git tag -s ${RELEASE_TAG} -m "${RELEASE_TAG}"`
1616
- -s creates a signed tag, you must have a GPG key [added to your GitHub account](https://docs.github.com/en/enterprise/2.16/user/github/authenticating-to-github/generating-a-new-gpg-key)
1717
- `git push upstream ${RELEASE_TAG}`
18-
- `make release` from repo, this will create the release artifacts in the `out/` folder
18+
- Update the file `metadata.yaml` if is a major or minor release
19+
- `make release` from repo, this will create the release artifacts in the `out/` folder
1920
- To install the `release-notes` tool, see https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md
2021
- Export GITHUB_TOKEN
2122
- Run the release-notes tool with the appropriate commits. Commits range from the first commit after the previous release to the new release commit.
2223
```
23-
release-notes --github-org kubernetes-sigs --github-repo cluster-api-provider-azure \
24+
release-notes --github-org kubernetes-sigs --github-repo cluster-api-provider-azure \
2425
--start-sha 1cf1ec4a1effd9340fe7370ab45b173a4979dc8f \
25-
--end-sha e843409f896981185ca31d6b4a4c939f27d975de
26+
--end-sha e843409f896981185ca31d6b4a4c939f27d975de
2627
```
2728
- Manually format and categorize the release notes
2829

29-
## Promote image to prod repo
30+
## Promote image to prod repo
3031
Promote image
3132
- Images are built by the [post push images job](https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-provider-azure#post-cluster-api-provider-azure-push-images)
3233
- Create a PR in https://github.com/kubernetes/k8s.io to add the image and tag
3334
- Example PR: https://github.com/kubernetes/k8s.io/pull/1030/files
3435
- Location of image: https://console.cloud.google.com/gcr/images/s-staging-cluster-api-azure/GLOBAL/cluster-api-azure-controller?rImageListsize=30
3536

36-
## Release in GitHub
37+
## Release in GitHub
3738
Create the GitHub release in the UI
3839
- Create a draft release in GitHub and associate it with the tag that was created
3940
- Copy paste the release notes
@@ -45,7 +46,7 @@
4546

4647
cluster-api-provider-azure follows the [semantic versionining][semver] specification.
4748

48-
As of this writing, we have not produced as a major or minor release.
49+
As of this writing, we have not produced as a major or minor release.
4950

5051
Current pre-release versions can be expected to have breaking changes as we move towards declaring a public API version.
5152

metadata.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# maps release series of major.minor to cluster-api contract version
2+
# the contract version may change between minor or major versions, but *not*
3+
# between patch versions.
4+
#
5+
# update this file only when a new major or minor version is released
6+
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
7+
releaseSeries:
8+
- major: 0
9+
minor: 3
10+
contract: v1alpha2
11+
- major: 0
12+
minor: 4
13+
contract: v1alpha3

0 commit comments

Comments
 (0)