File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -1649,6 +1649,7 @@ kapp
16491649karmadactl
16501650kaskade
16511651katana
1652+ kbld
16521653kcat
16531654kcgi
16541655kcov
Original file line number Diff line number Diff line change 1+ class Kbld < Formula
2+ desc "Tool for building and pushing container images in development workflows"
3+ homepage "https://carvel.dev/kbld/"
4+ url "https://github.com/carvel-dev/kbld/archive/refs/tags/v0.45.0.tar.gz"
5+ sha256 "06ec0c144ea24f462fad87bd57463e28cf853d6f58a47a434e79a2deb49d23cd"
6+ license "Apache-2.0"
7+ head "https://github.com/carvel-dev/kbld.git" , branch : "develop"
8+
9+ depends_on "go" => :build
10+
11+ def install
12+ ldflags = %W[
13+ -s -w
14+ -X carvel.dev/kbld/pkg/kbld/version.Version=#{ version }
15+ ]
16+ system "go" , "build" , *std_go_args ( ldflags :) , "./cmd/kbld"
17+ end
18+
19+ test do
20+ assert_match version . to_s , shell_output ( "#{ bin } /kbld --version" )
21+
22+ test_yaml = testpath /"test.yml"
23+ test_yaml . write <<~YAML
24+ ---
25+ apiVersion: v1
26+ kind: Pod
27+ metadata:
28+ name: test
29+ spec:
30+ containers:
31+ - name: test
32+ image: nginx:1.14.2
33+ YAML
34+
35+ output = shell_output ( "#{ bin } /kbld -f #{ test_yaml } " )
36+ assert_match "image: index.docker.io/library/nginx@sha256" , output
37+ end
38+ end
You can’t perform that action at this time.
0 commit comments