kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Even when `KANIKO_NO_PUSH="true"` there is a info message with "Pushed"

Open felipeng opened this issue 2 years ago • 0 comments

Actual behavior Setting KANIKO_NO_PUSH="true" doesn't push image to registry, however, displays a message that was pushed even though wasn't. This is confusing.

$ echo $KANIKO_NO_PUSH
true
$ /kaniko/executor --context $CI_PROJECT_DIR/$DOCKER_BUILD_CONTEXT --dockerfile $CI_PROJECT_DIR/${DOCKERFILE_LOCATION:-Dockerfile} --destination $ECR_REPO:$TAG_PREFIX-$TAG $BUILD_ARGS
INFO[0000] Using dockerignore file: /.dockerignore 
INFO[0000] Retrieving image manifest 123.dkr.ecr.us-west-2.amazonaws.com/shared/nginx-unprivileged:1.25-alpine 
INFO[0000] Retrieving image 123.dkr.ecr.us-west-2.amazonaws.com/shared/nginx-unprivileged:1.25-alpine from registry 123.dkr.ecr.us-west-2.amazonaws.com 
INFO[0000] Built cross stage deps: map[]                
INFO[0000] Retrieving image manifest 123.dkr.ecr.us-west-2.amazonaws.com/shared/nginx-unprivileged:1.25-alpine 
INFO[0000] Returning cached image manifest              
INFO[0000] Executing 0 build triggers                   
INFO[0000] Building stage '123.dkr.ecr.us-west-2.amazonaws.com/shared/nginx-unprivileged:1.25-alpine' [idx: '0', base-idx: '-1'] 
INFO[0000] Unpacking rootfs as cmd COPY build/static /usr/share/nginx/html/auth requires it. 
INFO[0001] COPY build/static /usr/share/nginx/html/auth 
INFO[0001] Taking snapshot of files...                  
INFO[0001] COPY deploy/nginx.conf /etc/nginx/templates/default.conf.template 
INFO[0001] Taking snapshot of files...                  
INFO[0001] USER nginx                                   
INFO[0001] Cmd: USER                                    
INFO[0002] Pushing image to 123.dkr.ecr.us-west-2.amazonaws.com/incharging/auth:amd64-v1081 
INFO[0002] Pushed 123.dkr.ecr.us-west-2.amazonaws.com/mygroup/auth@sha256:5ff14578966612bff529a2d76533e7d2c855cad7902c8fb3fedc043e5a37f3a2

Expected behavior If KANIKO_NO_PUSH="true" don't show the "Pushed ..." message

Additional Information

  • Kaniko: gcr.io/kaniko-project/executor:v1.22.0-debug
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
  • - [ ]

felipeng avatar Apr 18 '24 19:04 felipeng