-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add script for generating a krew plugin manifest. #645
Merged
jbarrick-mesosphere
merged 6 commits into
kudobuilder:master
from
jbarrick-mesosphere:krew
Jul 31, 2019
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4ab7097
Add script for generating a krew plugin manifest.
jbarrick-mesosphere 233a869
Add note about making PR to krew
jbarrick-mesosphere 5fd7b94
improve plugin documentation
jbarrick-mesosphere b226dab
Fetch kudo plugin from github for hashing.
jbarrick-mesosphere 8c8b9d9
Update shortDescription
jbarrick-mesosphere c9a5747
Add generate_krew.sh to RELEASE.md documentation.
jbarrick-mesosphere File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ The official binaries for KUDO are created using [goreleaser](https://goreleaser | |
4. Invoke goreleaser `goreleaser --rm-dist`. | ||
5. Update the GH release with Release high-levels. | ||
6. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] Kudo $VERSION is released` | ||
7. Run `./hack/generate_krew.sh` and submit the generated `kudo.yaml` to https://github.com/kubernetes-sigs/krew-index/. | ||
|
||
**Note:** If there are issues with the release, any changes to the repository will result in it being considered "dirty" and not in a state to be released. | ||
It is possible outside of the standard release process to build a "snapshot" release using the following command: `goreleaser release --skip-publish --snapshot --rm-dist` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# This script generates a Krew-compatible plugin manifest. It should be run after goreleaser. | ||
|
||
VERSION=${VERSION:-$(git describe --tags |sed 's/^v//g')} | ||
|
||
# Generate the manifest for a single platform. | ||
function generate_platform { | ||
ARCH="${2}" | ||
if [ "${2}" == "amd64" ]; then | ||
ARCH=x86_64 | ||
elif [ "${2}" == "386" ]; then | ||
ARCH=i386 | ||
fi | ||
|
||
cat <<EOF | ||
- selector: | ||
matchLabels: | ||
os: "${1}" | ||
arch: "${2}" | ||
uri: https://github.com/kudobuilder/kudo/releases/download/v${VERSION}/kudo_${VERSION}_${1}_${ARCH}.tar.gz | ||
sha256: "$(curl -L https://github.com/kudobuilder/kudo/releases/download/v${VERSION}/kudo_${VERSION}_${1}_${ARCH}.tar.gz |sha256sum - |awk '{print $1}')" | ||
bin: "./kubectl-kudo" | ||
files: | ||
- from: "*" | ||
to: "." | ||
EOF | ||
} | ||
|
||
rm -f kudo.yaml | ||
|
||
cat <<EOF >> kudo.yaml | ||
apiVersion: krew.googlecontainertools.github.com/v1alpha2 | ||
kind: Plugin | ||
metadata: | ||
name: kudo | ||
spec: | ||
version: "${VERSION}" | ||
|
||
shortDescription: Declaratively build, install, and run operators using KUDO. | ||
homepage: https://kudo.dev/ | ||
description: | | ||
The Kubernetes Universal Declarative Operator (KUDO) is a highly productive toolkit for writing operators for Kubernetes. | ||
Using KUDO, you can deploy your applications, give your users the tools they need to operate it, and understand how it's | ||
behaving in their environments — all without a PhD in Kubernetes. | ||
|
||
platforms: | ||
EOF | ||
|
||
generate_platform linux amd64 >> kudo.yaml | ||
generate_platform linux 386 >> kudo.yaml | ||
generate_platform darwin amd64 >> kudo.yaml | ||
generate_platform darwin 386 >> kudo.yaml | ||
generate_platform windows amd64 >> kudo.yaml | ||
generate_platform windows 386 >> kudo.yaml | ||
|
||
echo "To publish to the krew index, create a pull request to https://github.com/kubernetes-sigs/krew-index/tree/master/plugins to update kudo.yaml with the newly generated kudo.yaml." |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattj-io / @yankcrime / @gerred / @runyontr is there someone that would be willing to help me edit the descriptions here?