Skip to content

Commit

Permalink
add krew-release-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatjindal committed Feb 1, 2020
1 parent 28b4e29 commit 2e8b7cd
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .circleci/config.yml
Expand Up @@ -24,14 +24,42 @@ jobs:
- checkout
- run: curl -sL https://git.io/goreleaser | bash


update-krew-index:
working_directory: /go/src/github.com/robscott/kube-capacity

docker:
- image: circleci/golang:1.13
environment:
KREW_RELEASE_BOT_WEBHOOK_URL: https://krew-release-bot-dryrun.rajatjindal.com/github-action-webhook
KREW_RELEASE_BOT_VERSION: v0.0.34-4
steps:
- checkout
- run: |
echo "using krew-release-bot version ${KREW_RELEASE_BOT_VERSION}"
curl -LO https://github.com/rajatjindal/krew-release-bot/releases/download/${KREW_RELEASE_BOT_VERSION}/krew-release-bot_${KREW_RELEASE_BOT_VERSION}_linux_amd64.tar.gz
tar -xvf krew-release-bot_${KREW_RELEASE_BOT_VERSION}_linux_amd64.tar.gz
- run: ./krew-release-bot action


workflows:
version: 2
main:
jobs:
- test

- release:
filters:
branches:
ignore: /.*/
tags:
only: /[0-9]+(\.[0-9]+)*(-.*)*/
only: /[0-9]+(\.[0-9]+)*(-.*)*/

- update-krew-index:
requires:
- release
filters:
branches:
ignore: /.*/
tags:
only: /[0-9]+(\.[0-9]+)*(-.*)*/
29 changes: 29 additions & 0 deletions .krew.yaml
@@ -0,0 +1,29 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: resource-capacity
spec:
version: v{{ .TagName }}
homepage: https://github.com/robscott/kube-capacity
shortDescription: Provides an overview of resource requests, limits, and utilization
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
bin: kube-capacity
files:
- from: "*"
to: "."
{{addURIAndSha "https://github.com/robscott/kube-capacity/releases/download/{{ .TagName }}/kube-capacity_{{ .TagName }}_Darwin_x86_64.tar.gz" .TagName }}
- selector:
matchLabels:
os: linux
arch: amd64
bin: kube-capacity
files:
- from: "*"
to: "."
{{addURIAndSha "https://github.com/robscott/kube-capacity/releases/download/{{ .TagName }}/kube-capacity_{{ .TagName }}_Linux_x86_64.tar.gz" .TagName }}
description: |
A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster.

0 comments on commit 2e8b7cd

Please sign in to comment.