generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cmd,docs): updated docs and fixed cmd related tests.
Moreover, moved cmd output to more strictly follow `falcoctl` one, with regards to printing usage/helper messages. Signed-off-by: Federico Di Pierro <[email protected]>
- Loading branch information
Showing
23 changed files
with
124 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
level=INFO msg="using config file" file=testdata/configs/1.yaml | ||
level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls=[] repo-org=falcosecurity repo-name=libs | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
INFO using config file file: testdata/configs/1.yaml | ||
DEBUG running with options | ||
├ output-module: /tmp/falco-ubuntu-aws.ko | ||
├ output-probe: /tmp/falco-ubuntu-aws.o | ||
├ driverversion: master | ||
├ kernelrelease: 4.15.0-1057-aws | ||
├ kernelversion: 59 | ||
├ target: ubuntu-aws | ||
├ arch: {{ .CurrentArch }} | ||
├ kernelurls: [] | ||
├ repo-org: falcosecurity | ||
└ repo-name: libs | ||
INFO starting build processor: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
level=INFO msg="using config file" file=testdata/configs/1.yaml | ||
level=DEBUG msg="running with options" output-module=/tmp/override.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=229 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls=[] repo-org=falcosecurity repo-name=libs | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
INFO using config file file: testdata/configs/1.yaml | ||
DEBUG running with options | ||
├ output-module: /tmp/override.ko | ||
├ output-probe: /tmp/falco-ubuntu-aws.o | ||
├ driverversion: master | ||
├ kernelrelease: 4.15.0-1057-aws | ||
├ kernelversion: 229 | ||
├ target: ubuntu-aws | ||
├ arch: {{ .CurrentArch }} | ||
├ kernelurls: [] | ||
├ repo-org: falcosecurity | ||
└ repo-name: libs | ||
INFO starting build processor: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
level=INFO msg="using config file" file=testdata/configs/2.yaml | ||
level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls="[https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb]" repo-org=falcosecurity repo-name=libs | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
INFO using config file file: testdata/configs/2.yaml | ||
DEBUG running with options | ||
├ output-module: /tmp/falco-ubuntu-aws.ko | ||
├ output-probe: /tmp/falco-ubuntu-aws.o | ||
├ driverversion: master | ||
├ kernelrelease: 4.15.0-1057-aws | ||
├ kernelversion: 59 | ||
├ target: ubuntu-aws | ||
├ arch: {{ .CurrentArch }} | ||
├ kernelurls: [https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb] | ||
├ repo-org: falcosecurity | ||
└ repo-name: libs | ||
INFO starting build processor: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
level=DEBUG msg="running without a configuration file" | ||
level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-azure.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-azure kernelversion=62 target=ubuntu-azure arch={{ .CurrentArch }} kernelurls="[http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-azure-headers-4.15.0-1057_4.15.0-1057.62_all.deb http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-headers-4.15.0-1057-azure_4.15.0-1057.62_amd64.deb]" repo-org=falcosecurity repo-name=libs | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
DEBUG running without a configuration file | ||
DEBUG running with options | ||
├ output-module: /tmp/falco-ubuntu-azure.ko | ||
├ output-probe: /tmp/falco-ubuntu-aws.o | ||
├ driverversion: master | ||
├ kernelrelease: 4.15.0-1057-azure | ||
├ kernelversion: 62 | ||
├ target: ubuntu-azure | ||
├ arch: {{ .CurrentArch }} | ||
├ kernelurls: [http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-azure-headers-4.15.0-1057_4.15.0-1057.62_all.deb http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-headers-4.15.0-1057-azure_4.15.0-1057.62_amd64.deb] | ||
├ repo-org: falcosecurity | ||
└ repo-name: libs | ||
INFO starting build processor: docker |
12 changes: 4 additions & 8 deletions
12
cmd/testdata/docker-target-redhat-validation-error-debug.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
level=DEBUG msg="running without a configuration file" | ||
level=ERROR msg="error validating build options" err="builder image is a required field when target is redhat" | ||
Error: exiting for validation errors | ||
Usage: | ||
driverkit docker [flags] | ||
|
||
{{ .Flags }} | ||
|
||
DEBUG running without a configuration file | ||
ERROR error validating build options | ||
└ err: builder image is a required field when target is redhat | ||
ERROR error executing driverkit err: exiting for validation errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
level=DEBUG msg="running without a configuration file" | ||
level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls="[https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb]" repo-org=falcosecurity repo-name=libs | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
DEBUG running without a configuration file | ||
DEBUG running with options | ||
├ output-module: /tmp/falco-ubuntu-aws.ko | ||
├ output-probe: /tmp/falco-ubuntu-aws.o | ||
├ driverversion: master | ||
├ kernelrelease: 4.15.0-1057-aws | ||
├ kernelversion: 59 | ||
├ target: ubuntu-aws | ||
├ arch: {{ .CurrentArch }} | ||
├ kernelurls: [https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb] | ||
├ repo-org: falcosecurity | ||
└ repo-name: libs | ||
INFO starting build processor: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
level=INFO msg="driver building, it will take a few seconds" processor=docker | ||
INFO starting build processor: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
level=ERROR msg="error validating build options" err="kernel release is a required field" | ||
level=ERROR msg="error validating build options" err="target is a required field" | ||
level=ERROR msg="error validating build options" err="output module path is required when probe is missing" | ||
level=ERROR msg="error validating build options" err="output probe path is required when module is missing" | ||
Error: exiting for validation errors | ||
Usage: | ||
driverkit docker [flags] | ||
|
||
{{ .Flags }} | ||
|
||
ERROR error validating build options err: kernel release is a required field | ||
ERROR error validating build options err: target is a required field | ||
ERROR error validating build options | ||
└ err: output module path is required when probe is missing | ||
ERROR error validating build options | ||
└ err: output probe path is required when module is missing | ||
ERROR error executing driverkit err: exiting for validation errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
level=ERROR msg="error validating config options" err="proxy url must start with http:// or https:// or socks5:// prefix" | ||
Error: exiting for validation errors | ||
{{ .Usage }} | ||
|
||
{{ .Commands }} | ||
|
||
{{ .Flags }} | ||
-v, --version version for driverkit | ||
|
||
{{ .Info }} | ||
|
||
ERROR error validating config options | ||
└ err: proxy url must start with http:// or https:// or socks5:// prefix | ||
ERROR error executing driverkit err: exiting for validation errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
Error: invalid argument "abc" for "driverkit" | ||
{{ .Usage }} | ||
|
||
{{ .Commands }} | ||
|
||
{{ .Flags }} | ||
-v, --version version for driverkit | ||
|
||
{{ .Info }} | ||
|
||
ERROR error executing driverkit err: invalid argument "abc" for "driverkit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.