Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Formula/k/kaniko.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class Kaniko < Formula
desc "Build Container Images In Kubernetes"
homepage "https://github.com/chainguard-dev/kaniko"
url "https://github.com/chainguard-dev/kaniko/archive/refs/tags/v1.25.13.tar.gz"
sha256 "d64be2d35c885f45d3c50b71b47e5534eaa2cb46178835abcb0d9f214c71ef7e"
license "Apache-2.0"
head "https://github.com/chainguard-dev/kaniko.git", branch: "main"

depends_on "go" => :build
depends_on :linux

def install
ldflags = "-s -w -X github.com/chainguard-dev/kaniko/pkg/version.Version=#{version}"

%w[executor warmer].each do |cmd|
system "go", "build", *std_go_args(ldflags:, output: bin/"kaniko-#{cmd}"), "./cmd/#{cmd}"
end
end

test do

Check failure on line 20 in Formula/k/kaniko.rb

View workflow job for this annotation

GitHub Actions / build-formula (ubuntu-22.04-arm, ghcr.io/homebrew/ubuntu22.04:main, --user=linuxbrew, /github/hom...

`brew test --verbose chenrui333/tap/kaniko` failed on Linux arm64!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.3/bin/bundle ==> Testing chenrui333/tap/kaniko ==> /home/linuxbrew/.linuxbrew/Cellar/kaniko/1.25.13/bin/kaniko-executor --version Error: unknown flag: --version Usage: executor [flags] executor [command] Available Commands: completion Generate the autocompletion script for the specified shell help Help about any command version Print the version number of kaniko Flags: --annotation key-value-arg type Set metadata annotations for the image in key=value format. Set it repeatedly for multiple annotations. --build-arg multi-arg type This flag allows you to pass in ARG values at build time. Set it repeatedly for multiple values. --cache Use cache when building image --cache-copy-layers Caches copy layers --cache-dir string Specify a local directory to use as a cache. (default "/cache") --cache-repo string Specify a repository to use as a cache, otherwise one will be inferred from the destination provided; when prefixed with 'oci:' the repository will be written in OCI image layout format at the path provided --cache-run-layers Caches run layers (default true) --cache-ttl duration Cache timeout, requires value and unit of duration -> ex: 6h. Defaults to two weeks. (default 336h0m0s) --cleanup Clean the filesystem at the end --compressed-caching Compress the cached layers. Decreases build time, but increases memory usage. (default true) --compression compression Compression algorithm (gzip, zstd) --compression-level int Compression level (default -1) -c, --context string Path to the dockerfile build context. (default "/workspace/") --context-sub-path string Sub path within the given context. --custom-platform string Specify the build platform if different from the current host --customPlatform string This flag is deprecated. Please use '--custom-platform'. -d, --destination multi-arg type Registry the final image should be pushed to. Set it repeatedly for multiple destinations. --digest-file string Specify a file to save the digest of the built image to. -f, --dockerfile string Path to the dockerfile to be built. (default "Dockerfile") --force Force building outside of a container --force-build-metadata Force add metadata layers to build image --git gitoptions Branch to clone if build context is a git repository (default branch=,single-branch=false,recurse-submodules=false) -h, --help help for executor --ignore-path multi-arg type Ignore these paths when taking a snapshot. Set it repeatedly for multiple paths. --ignore-var-run Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (default true) --image-download-retry int Number of retries for downloading the remote image --image-fs-extract-retry int Number of retries for image FS extraction --image-name-tag-with-digest-file string Specify a file to save the image name w/ image tag w/ digest of the built image to. --image-name-with-digest-file string Specify a file to save the image name w/ digest of the built image to. --insecure Push to insecure registry using plain HTTP --insecure-pull Pull from insecure registry using plain HTTP --insecure-registry multi-arg type

Check failure on line 20 in Formula/k/kaniko.rb

View workflow job for this annotation

GitHub Actions / build-formula (ubuntu-22.04, ghcr.io/homebrew/ubuntu22.04:main, --user=linuxbrew, /github/home, f...

`brew test --verbose chenrui333/tap/kaniko` failed on Linux x86_64!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.3/bin/bundle ==> Testing chenrui333/tap/kaniko ==> /home/linuxbrew/.linuxbrew/Cellar/kaniko/1.25.13/bin/kaniko-executor --version Error: unknown flag: --version Usage: executor [flags] executor [command] Available Commands: completion Generate the autocompletion script for the specified shell help Help about any command version Print the version number of kaniko Flags: --annotation key-value-arg type Set metadata annotations for the image in key=value format. Set it repeatedly for multiple annotations. --build-arg multi-arg type This flag allows you to pass in ARG values at build time. Set it repeatedly for multiple values. --cache Use cache when building image --cache-copy-layers Caches copy layers --cache-dir string Specify a local directory to use as a cache. (default "/cache") --cache-repo string Specify a repository to use as a cache, otherwise one will be inferred from the destination provided; when prefixed with 'oci:' the repository will be written in OCI image layout format at the path provided --cache-run-layers Caches run layers (default true) --cache-ttl duration Cache timeout, requires value and unit of duration -> ex: 6h. Defaults to two weeks. (default 336h0m0s) --cleanup Clean the filesystem at the end --compressed-caching Compress the cached layers. Decreases build time, but increases memory usage. (default true) --compression compression Compression algorithm (gzip, zstd) --compression-level int Compression level (default -1) -c, --context string Path to the dockerfile build context. (default "/workspace/") --context-sub-path string Sub path within the given context. --custom-platform string Specify the build platform if different from the current host --customPlatform string This flag is deprecated. Please use '--custom-platform'. -d, --destination multi-arg type Registry the final image should be pushed to. Set it repeatedly for multiple destinations. --digest-file string Specify a file to save the digest of the built image to. -f, --dockerfile string Path to the dockerfile to be built. (default "Dockerfile") --force Force building outside of a container --force-build-metadata Force add metadata layers to build image --git gitoptions Branch to clone if build context is a git repository (default branch=,single-branch=false,recurse-submodules=false) -h, --help help for executor --ignore-path multi-arg type Ignore these paths when taking a snapshot. Set it repeatedly for multiple paths. --ignore-var-run Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (default true) --image-download-retry int Number of retries for downloading the remote image --image-fs-extract-retry int Number of retries for image FS extraction --image-name-tag-with-digest-file string Specify a file to save the image name w/ image tag w/ digest of the built image to. --image-name-with-digest-file string Specify a file to save the image name w/ digest of the built image to. --insecure Push to insecure registry using plain HTTP --insecure-pull Pull from insecure registry using plain HTTP --insecure-registry multi-arg type
assert_match version.to_s, shell_output("#{bin}/kaniko-executor --version")
end
end
Loading