Coder Social home page Coder Social logo

knb's Introduction

KNB

A proof-of-concept CLI for getting informatiom about the status of a Knative Build object. Lets say you have a number of build jobs, you can get a list with kubectl get build. But how do you find more out about the job? Has it passed or failed? What was the error message if it failed? What steps comprised the build? How do you get the logs for each step? knb provides a simple answer.

$ knb sample-124
Build       Passed    Date                 Template    Source
----------  --------  -------------------  ----------  ----------------------------------------------------
sample-124  False     2018-11-16 10:42:20  multi       https://github.com/garethr/multi-stage-build-example

build step "build-step-structure-tests" exited with code 1 (image: "docker-pullable://gcr.io/gcp-runtimes/container-
structure-test@sha256:2b7c4f4031d220bd7a72c930c563f8a66bd55abb8044480c67cbb09a078cabe2"); for logs run: kubectl -n 
default logs sample-124-zcgll -c build-step-structure-tests

Arguments (1)    Value
---------------  -------------
IMAGE            garethr/multi

Steps (6)
----------------------
credential-initializer
git-source-0
test
check
build
structure-tests

From the above sample we can see that the Build failed, and that the structure-tests step was to blame. We can then investogate further by looking at the logs for that step:

$ knb sample-124 structure-tests

Alternative

The above commands are really just syntactic sugar over the following:

$ kubectl get build
$ kubectl get build <build-name> -o yaml
# skim the YAML document looking for the pod name
# kubectl logs <pod-name> -c build-step-<step-name>

Requirements

knb currently uses kubectl rather than going directly to the Kubernetes API so kubectl needs to be installed and working correctly.

Warning

Warning knb is pretty hacky and likely to explode, especially as Knative Build evolves. It's mainly a proof-of-concept to explore potential user interfaces.

knb's People

Contributors

garethr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

webclinic017

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.