Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Wrong 0 exit status code reported on fail to push image to private registry #719

Closed
rkrasiuk opened this issue Oct 28, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working cli
Milestone

Comments

@rkrasiuk
Copy link

Describe the bug
When pushing an image to the private registry with no credentials, waypoint fails with 0 exit code.

➜ waypoint up

» Building...
✓ Initializing Docker client...
✓ Building image...
 │ Successfully tagged waypoint.local/<app name>:latest
✓ Tagging Docker image: waypoint.local/<app name>:latest => <private registry address>:<tag>
❌ Pushing Docker image...
 │ The push refers to repository [<private registry address>]
! unable to stream Docker logs to terminal: denied: Your authorization token has expired. Reauthenticate and try again.

➜ echo $?
0

Steps to Reproduce

project = "project-name"

app "app-name" {
  build {
    use "docker" {
      buildkit = true
      disable_entrypoint = true
    }

    registry {
      use "docker" {
        image = "<private registry address>"
        tag   = gitrefhash()
      }
    } 
  }
}

Expected behavior
Expected non-zero exit code.

Additional context
This gives false positives on running github actions. The final action status is a success whereas the command has failed.

@mitchellh
Copy link
Contributor

Fixed by @krantzinator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working cli
Projects
None yet
Development

No branches or pull requests

3 participants