Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubectl plugin for darwin arm64 #37

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,12 @@ to set the following flags when calling `cmrel publish`:
--published-helm-chart-bucket='mycompany-helm-charts' # name of the GCS bucket where the built Helm chart should be stored
--published-github-org='mycompany' # name of the GitHub org containing the repo that will be tagged at the end
```

### Development

#### Creating development builds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: great addition, love it 👌


By default the artifacts created during a release process are pushed to `cert-manager-release` bucket at `/stage/gcb/release` path.
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.

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.
14 changes: 7 additions & 7 deletions cmd/cmrel/cmd/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ staging release bucket.

var (
stageExample = fmt.Sprintf(`
To stage a release of the 'master' branch to the default staging bucket, run:
To stage a release of the 'master' branch to the default staging bucket at 'devel' path, run:

%s %s --git-ref=master
%s %s --branch=master

To stage a release of the 'release-0.14' branch to the default staging bucket,
To stage a release of the 'release-0.14' branch to the default staging bucket at 'release' path,
overriding the release version as 'v0.14.0', run:

%s %s --git-ref=release-0.14 --release-version=v0.14.0`, rootCommand, stageCommand, rootCommand, stageCommand)
%s %s --branch=release-0.14 --release-version=v0.14.0`, rootCommand, stageCommand, rootCommand, stageCommand)
)

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

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

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

// Project to run the GCB job in
// Project is the name of the GCP project to run the GCB job in
Project string

// ReleaseVersion, if set, overrides the version git version tag used
Expand All @@ -95,7 +95,7 @@ func (o *stageOptions) AddFlags(fs *flag.FlagSet, markRequired func(string)) {
fs.StringVar(&o.CloudBuildFile, "cloudbuild", "./gcb/stage/cloudbuild.yaml", "The path to the cloudbuild.yaml file used to perform the cert-manager crossbuild. "+
"The default value assumes that this tool is run from the root of the release repository.")
fs.StringVar(&o.Project, "project", release.DefaultReleaseProject, "The GCP project to run the GCB build jobs in.")
fs.StringVar(&o.ReleaseVersion, "release-version", "", "Optional release version override used to force the version strings used during the release to a specific value.")
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.")
fs.StringVar(&o.PublishedImageRepository, "published-image-repo", release.DefaultImageRepository, "The docker image repository set when building the release.")
markRequired("branch")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/release/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ var (
// This is used to determine which artifacts should be uploaded.
ClientPlatforms = map[string][]string{
"linux": []string{"amd64", "arm", "arm64", "ppc64le", "s390x"},
"darwin": []string{"amd64"},
"darwin": []string{"amd64", "arm64"},
"windows": []string{"amd64"},
}

// ArchitecturesPerOS is the list of OSes and architectures that we can build
// This is used to drive the `--platforms` flag passed to 'bazel build'
ArchitecturesPerOS = map[string][]string{
"linux": []string{"amd64", "arm", "arm64", "ppc64le", "s390x"},
"darwin": []string{"amd64"},
"darwin": []string{"amd64", "arm64"},
"windows": []string{"amd64"},
}
)
Expand Down