Skip to content

Commit

Permalink
added github workflow for CI, added krew, updated homebrew (#83)
Browse files Browse the repository at this point in the history
* homebrew added to goreleaser and github workflow added for auto builds

* commit auther to krew and homebrew publishing

* add krew installation steps in readme

* version upgrade
  • Loading branch information
chandanpasunoori committed Jan 4, 2023
1 parent 4b7432a commit e1e6369
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 21 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86 changes: 65 additions & 21 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com

env:
- GO111MODULE=on

Expand All @@ -9,40 +6,87 @@ before:
- go mod download

builds:
- main: cmd/kail/main.go
binary: kail
goos:
- darwin
- linux
goarch:
- amd64
- arm
- arm64
env:
- CGO_ENABLED=0
- main: cmd/kail/main.go
binary: kail
goos:
- darwin
- linux
goarch:
- amd64
- arm
- arm64
goamd64:
- v1
- v2
- v3
env:
- CGO_ENABLED=0

brews:
-
tap:
- tap:
owner: boz
name: homebrew-repo
branch: master
commit_author:
name: boz
email: adam.boz@gmail.com
goamd64: v2
homepage: "https://github.com/boz/kail"
description: "kubernetes tail - pod log viewer"

krews:
- name: tail
goarm: 6
goamd64: v2
index:
owner: boz
name: krew-index
branch: master
commit_author:
name: boz
email: adam.boz@gmail.com
homepage: "https://github.com/boz/kail"
description: |-
Kail https://github.com/boz/kail - "Just show me the logs"
Stream logs from all matched containers of all matched pods. Match pods by service,
replicaset, deployment, and others. Adjusts to a changing cluster - pods are
added and removed from logging as they fall in or out of the selection.
Documentation:
See https://github.com/boz/kail or
$ kubectl tail --help
Usage:
# match all pods
$ kubectl tail
# match pods in the 'frontend' namespace
$ kubectl tail --ns staging
# match pods belonging to a replicaset named 'workers' in any namespace.
$ kubectl tail --rs workers
# match pods belonging to the replicaset named 'workers' only in the 'staging' namespace
$ kubectl tail --rs staging/workers
# match pods belonging to both the service "frontend" and the deployment "webapp"
$ kubectl tail --svc frontend --deploy webapp
short_description: "Stream logs from multiple pods and containers using simple, dynamic source selection."

checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"

release:
github:
owner: boz
name: kail
prerelease: false
draft: false
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ $ brew tap boz/repo
$ brew install boz/repo/kail
```

### Krew

```sh
$ kubectl krew install tail
$ kubectl tail -h
```

### Downloading

Kail binaries for Linux and OSX can be found on the [latest release](https://github.com/boz/kail/releases/latest) page. Download and install into your `$GOPATH/bin` with:
Expand Down

0 comments on commit e1e6369

Please sign in to comment.