Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ func buildCmd(c *cli.Context) error {
}

// Extract build configuration and arguments
_, rtDetails, _, _, _, cleanArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
_, rtDetails, _, skipLogin, _, cleanArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
if err != nil {
return err
}
Expand All @@ -1051,12 +1051,14 @@ func buildCmd(c *cli.Context) error {
return err
}

// Login to the docker registry
err = loginCmd(c)
if err != nil {
return err
if !skipLogin {
// Login to the docker registry
err = loginCmd(c)
if err != nil {
return err
}
}

dockerOptions := strategies.DockerBuildOptions{
DockerFilePath: dockerFilePath,
PushExpected: pushOption,
Expand Down
Loading