carvel-dev / kbld

kbld seamlessly incorporates image building and image pushing into your development and deployment workflows
https://carvel.dev/kbld
Apache License 2.0
294 stars 41 forks source link

kbld with flag --json swallows error #455

Open kumaritanushree opened 10 months ago

kumaritanushree commented 10 months ago

What steps did you take: I have config.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kbld-nginx
spec:
  selector:
    matchLabels:
      app: kbld-nginx
  template:
    metadata:
      labels:
        app: kbld-nginx
    spec:
      containers:
      - name: my-app
        image: nginxix

And it is throwing error when run kbld command without --json flag:

$ kbld -f nginx/config.yml 
kbld: Error: 
- Resolving image 'nginxix': GET https://index.docker.io/v2/library/nginxix/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/nginxix Type:repository]]

While it will exit without printing any error message or any log if will run with flag --json

What happened: When we run kbld command with flag --json it is exiting without printing any error message or any log in case of failure.

What did you expect: When we run kbld command with flag --json it should print error message in case of failure.

Anything else you would like to add: [Additional information that will assist in solving the issue.]

Environment:

If building images using docker:

If building images using buildkit:

If building images using pack


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.