mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
Add options to docker login azure to support Service Principal login. Use it in E2E tests
This commit is contained in:
parent
c049f3c7af
commit
ec5f4e9202
5 changed files with 130 additions and 18 deletions
|
|
@ -14,11 +14,17 @@ func AzureLoginCommand() *cobra.Command {
|
|||
Short: "Log in to azure",
|
||||
Args: cobra.MaximumNArgs(0),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
err := opts.Validate()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cloudLogin(cmd, "aci", opts)
|
||||
},
|
||||
}
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&opts.TenantID, "tenant-id", "", "Specify tenant ID to use from your azure account")
|
||||
flags.StringVar(&opts.TenantID, "tenant-id", "", "Specify tenant ID to use")
|
||||
flags.StringVar(&opts.ClientID, "client-id", "", "Client ID for Service principal login")
|
||||
flags.StringVar(&opts.ClientSecret, "client-secret", "", "Client secret for Service principal login")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue