Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kaniko doesn't fail when context path does not exist #3201

Open
abitrolly opened this issue Jun 13, 2024 · 1 comment
Open

kaniko doesn't fail when context path does not exist #3201

abitrolly opened this issue Jun 13, 2024 · 1 comment
Labels
area/cli bugs related to kaniko CLI good first issue Good for newcomers help wanted Looking for a volunteer! kind/bug Something isn't working priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@abitrolly
Copy link

abitrolly commented Jun 13, 2024

Actual behavior

Passing invalid context dir doesn't make kaniko fail.

> gcr.io/kaniko-project/executor --no-push --context something -v debug
DEBU[0000] Copying file /workdir/Dockerfile to /kaniko/Dockerfile 
DEBU[0000] Skip resolving path /kaniko/Dockerfile       
DEBU[0000] Resolved relative path something to /workdir/something 
DEBU[0000] Skip resolving path /cache                   
DEBU[0000] Skip resolving path                          
DEBU[0000] Skip resolving path                          
DEBU[0000] Skip resolving path                          
DEBU[0000] Skip resolving path                          
DEBU[0000] Built stage name to index map: map[]         
INFO[0000] No base image, nothing to extract            
INFO[0000] Built cross stage deps: map[]                
INFO[0000] No base image, nothing to extract            
INFO[0000] Executing 0 build triggers                   
INFO[0000] Building stage 'scratch' [idx: '0', base-idx: '-1'] 
INFO[0000] Skipping unpacking as no commands require it. 
INFO[0000] ENV amg="root"                               
DEBU[0000] Build: skipping snapshot for [ENV amg="root"] 
DEBU[0000] Mapping stage idx 0 to digest sha256:f7fe2f771f2ed6847e71975dc037e9f5dcad1efcbb3257a4ef97030919e803a5 
DEBU[0000] Mapping digest sha256:f7fe2f771f2ed6847e71975dc037e9f5dcad1efcbb3257a4ef97030919e803a5 to cachekey  
INFO[0000] Skipping push to container registry due to --no-push flag

The /workdir/something does not exist.

$ ls -la
total 4
drwxr-xr-x.  4 anatoli anatoli 100 Jun 13 12:53 .
drwxrwxrwt. 25 root    root    700 Jun 13 13:04 ..
drwxr-xr-x.  2 anatoli anatoli  60 Jun 13 12:34 child
-rw-r--r--.  1 anatoli anatoli  29 Jun 13 12:34 Dockerfile
drwxr-xr-x.  2 anatoli anatoli  40 Jun 13 12:53 nothing    

Expected behavior
A clear and concise description of what you expected to happen.

To Reproduce
Steps to reproduce the behavior:

  1. ...
  2. ...

Additional Information

  • Dockerfile
FROM scratch

ENV amg="root"
  • Build Context
  • Kaniko Image (fully qualified with digest)
gcr.io/kaniko-project/executor                   latest        8e981b24e935  7 days ago    71.9 MB

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
  • - [-]
Please check if your dockerfile is a multistage dockerfile
  • - [-]
@abitrolly
Copy link
Author

@aaron-prindle hi. I saw you've added roadmap with GitLab CI support https://github.com/GoogleContainerTools/kaniko/blob/main/ROADMAP.md#q1--q2-2024

Who is the DRI for this feature to add some gitlab-ci-support label to this issue? Because it is harder to debug missing context in CI jobs than in.. well, I use with GitLab CI and expected kaniko to fail much earlier in this case.

@aaron-prindle aaron-prindle added kind/bug Something isn't working area/cli bugs related to kaniko CLI priority/p3 agreed that this would be good to have, but no one is available at the moment. help wanted Looking for a volunteer! good first issue Good for newcomers labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bugs related to kaniko CLI good first issue Good for newcomers help wanted Looking for a volunteer! kind/bug Something isn't working priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

2 participants