Skip to content

Commit 3bd8661

Browse files
authored
Merge pull request #37 from irbekrm/kubectl_plugin_for_darwin_arm
Kubectl plugin for darwin arm64
2 parents e1d8706 + 45a1439 commit 3bd8661

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,12 @@ to set the following flags when calling `cmrel publish`:
145145
--published-helm-chart-bucket='mycompany-helm-charts' # name of the GCS bucket where the built Helm chart should be stored
146146
--published-github-org='mycompany' # name of the GitHub org containing the repo that will be tagged at the end
147147
```
148+
149+
### Development
150+
151+
#### Creating development builds
152+
153+
By default the artifacts created during a release process are pushed to `cert-manager-release` bucket at `/stage/gcb/release` path.
154+
It is also possible to create a 'development' build by skipping the `--release-version` flag on `cmrel stage` command. This will result in the build artifacts being pushed to `cert-manager-release` bucket at `/stage/gcb/devel` path.
155+
156+
If you have made some local changes to this tool and want to create a 'devel' build to test them, be mindful that the Google Cloud Build triggered by running `cmrel stage` clones this repository from GitHub and runs its own `cmrel` commands. You can modify the [Cloud Build config](https://github.com/cert-manager/release/blob/master/gcb/stage/cloudbuild.yaml) to configure a different GitHub repository/branch.

cmd/cmrel/cmd/stage.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ staging release bucket.
4141

4242
var (
4343
stageExample = fmt.Sprintf(`
44-
To stage a release of the 'master' branch to the default staging bucket, run:
44+
To stage a release of the 'master' branch to the default staging bucket at 'devel' path, run:
4545
46-
%s %s --git-ref=master
46+
%s %s --branch=master
4747
48-
To stage a release of the 'release-0.14' branch to the default staging bucket,
48+
To stage a release of the 'release-0.14' branch to the default staging bucket at 'release' path,
4949
overriding the release version as 'v0.14.0', run:
5050
51-
%s %s --git-ref=release-0.14 --release-version=v0.14.0`, rootCommand, stageCommand, rootCommand, stageCommand)
51+
%s %s --branch=release-0.14 --release-version=v0.14.0`, rootCommand, stageCommand, rootCommand, stageCommand)
5252
)
5353

5454
type stageOptions struct {
@@ -61,7 +61,7 @@ type stageOptions struct {
6161
// Name of the GitHub repo to fetch cert-manager sources from
6262
Repo string
6363

64-
// Name of the GitHub repo to build cert-manager sources from
64+
// Name of the branch in the GitHub repo to build cert-manager sources from
6565
Branch string
6666

6767
// Optional commit ref of cert-manager that should be staged
@@ -70,7 +70,7 @@ type stageOptions struct {
7070
// The path to the cloudbuild.yaml file used to perform the cert-manager crossbuild
7171
CloudBuildFile string
7272

73-
// Project to run the GCB job in
73+
// Project is the name of the GCP project to run the GCB job in
7474
Project string
7575

7676
// ReleaseVersion, if set, overrides the version git version tag used
@@ -95,7 +95,7 @@ func (o *stageOptions) AddFlags(fs *flag.FlagSet, markRequired func(string)) {
9595
fs.StringVar(&o.CloudBuildFile, "cloudbuild", "./gcb/stage/cloudbuild.yaml", "The path to the cloudbuild.yaml file used to perform the cert-manager crossbuild. "+
9696
"The default value assumes that this tool is run from the root of the release repository.")
9797
fs.StringVar(&o.Project, "project", release.DefaultReleaseProject, "The GCP project to run the GCB build jobs in.")
98-
fs.StringVar(&o.ReleaseVersion, "release-version", "", "Optional release version override used to force the version strings used during the release to a specific value.")
98+
fs.StringVar(&o.ReleaseVersion, "release-version", "", "Optional release version override used to force the version strings used during the release to a specific value. If not set, build is treated as development build and artifacts staged to 'devel' path.")
9999
fs.StringVar(&o.PublishedImageRepository, "published-image-repo", release.DefaultImageRepository, "The docker image repository set when building the release.")
100100
markRequired("branch")
101101
}

pkg/release/consts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ var (
9191
// This is used to determine which artifacts should be uploaded.
9292
ClientPlatforms = map[string][]string{
9393
"linux": []string{"amd64", "arm", "arm64", "ppc64le", "s390x"},
94-
"darwin": []string{"amd64"},
94+
"darwin": []string{"amd64", "arm64"},
9595
"windows": []string{"amd64"},
9696
}
9797

9898
// ArchitecturesPerOS is the list of OSes and architectures that we can build
9999
// This is used to drive the `--platforms` flag passed to 'bazel build'
100100
ArchitecturesPerOS = map[string][]string{
101101
"linux": []string{"amd64", "arm", "arm64", "ppc64le", "s390x"},
102-
"darwin": []string{"amd64"},
102+
"darwin": []string{"amd64", "arm64"},
103103
"windows": []string{"amd64"},
104104
}
105105
)

0 commit comments

Comments
 (0)