You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior
When trying to grep some content during a ci pipeline I get this error:
grep: invalid option -- P
BusyBox v1.32.0 (2020-12-03 00:49:17 UTC) multi-call binary.
Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
Search for PATTERN in FILEs (or stdin)
-H Add 'filename:' prefix
-h Do not add 'filename:' prefix
-n Add 'line_no:' prefix
-l Show only names of files that match
-L Show only names of files that don't match
-c Show only count of matching lines
-o Show only the matching part of line
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress open and read errors
-r Recurse
-R Recurse and dereference symlinks
-i Ignore case
-w Match whole words only
-x Match whole lines only
-F PATTERN is a literal (not regexp)
-E PATTERN is an extended regexp
-m N Match up to N times per file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Same as '-A N -B N'
-e PTRN Pattern to match
-f FILE Read pattern from file
Expected behavior
the grep command should get the version number out of a specific file
To Reproduce
Steps to reproduce the behavior:
Start a CI/CD pipeline with the latest gcr.io/kaniko-project/executor:debug image
Use a grep -Pzo command like provided later.
Additional Information
Dockerfile
There isn't a specific Dockerfile needed to reproduce that error.
This sounds like busybox (which Kaniko's :debug image is based on to provide a shell and userspace) doesn't support grep -P. I'm not sure there's a lot we can do about it, unless this is a recent regression.
In that case, I think this is working as intended -- the :debug image is based on busybox, which supports certain options for grep, of which -P is not one.
Actual behavior
When trying to grep some content during a ci pipeline I get this error:
Expected behavior
the grep command should get the version number out of a specific file
To Reproduce
Steps to reproduce the behavior:
gcr.io/kaniko-project/executor:debug
imagegrep -Pzo
command like provided later.Additional Information
There isn't a specific Dockerfile needed to reproduce that error.
Example File
Example yaml
version/number:22.3.1
Example grep command inside the pipeline
--cache
flagThe text was updated successfully, but these errors were encountered: