Skip to content

Commit

Permalink
feat: account azure-oidc create (#296)
Browse files Browse the repository at this point in the history
* feat: account azure-oidc list
  • Loading branch information
benPearce1 authored Dec 12, 2023
1 parent 973c79e commit 554d171
Show file tree
Hide file tree
Showing 13 changed files with 666 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
--health-retries 10
--health-start-period 10s
octopusserver:
image: docker.packages.octopushq.com/octopusdeploy/octopusdeploy:2022.4.3812-linux
image: docker.packages.octopushq.com/octopusdeploy/octopusdeploy:2023.4.8126-linux
env:
ACCEPT_EULA: Y
DB_CONNECTION_STRING: "Server=sqlserver;Database=OctopusDeploy;User Id=sa;Password=${{ env.SA_PASSWORD }};"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/MakeNowJust/heredoc/v2 v2.0.1
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.32.0
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.34.0
github.com/bmatcuk/doublestar/v4 v4.4.0
github.com/briandowns/spinner v1.19.0
github.com/google/uuid v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZ
github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.32.0 h1:UWNSsntIp4J+F7JOw4k6Df4gAOg8fBwCyoeBizy1ff4=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.32.0/go.mod h1:GZmFu6LmN8Yg0tEoZx3ytk9FnaH+84cWm7u5TdWZC6E=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.34.0 h1:S8h21VdVSHC8yfAk0Te8eHU/gkJ+3w2pv7Q/0kooK8I=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.34.0/go.mod h1:GZmFu6LmN8Yg0tEoZx3ytk9FnaH+84cWm7u5TdWZC6E=
github.com/bmatcuk/doublestar/v4 v4.4.0 h1:LmAwNwhjEbYtyVLzjcP/XeVw4nhuScHGkF/XWXnvIic=
github.com/bmatcuk/doublestar/v4 v4.4.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/briandowns/spinner v1.19.0 h1:s8aq38H+Qju89yhp89b4iIiMzMm8YN3p6vGpwyh/a8E=
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/MakeNowJust/heredoc/v2"
cmdAWS "github.com/OctopusDeploy/cli/pkg/cmd/account/aws"
cmdAzure "github.com/OctopusDeploy/cli/pkg/cmd/account/azure"
cmdAzureOidc "github.com/OctopusDeploy/cli/pkg/cmd/account/azure-oidc"
cmdCreate "github.com/OctopusDeploy/cli/pkg/cmd/account/create"
cmdDelete "github.com/OctopusDeploy/cli/pkg/cmd/account/delete"
cmdGCP "github.com/OctopusDeploy/cli/pkg/cmd/account/gcp"
Expand Down Expand Up @@ -33,6 +34,7 @@ func NewCmdAccount(f factory.Factory) *cobra.Command {
cmd.AddCommand(cmdList.NewCmdList(f))
cmd.AddCommand(cmdAWS.NewCmdAws(f))
cmd.AddCommand(cmdAzure.NewCmdAzure(f))
cmd.AddCommand(cmdAzureOidc.NewCmdAzureOidc(f))
cmd.AddCommand(cmdGCP.NewCmdGcp(f))
cmd.AddCommand(cmdSSH.NewCmdSsh(f))
cmd.AddCommand(cmdUsr.NewCmdUsername(f))
Expand Down
24 changes: 24 additions & 0 deletions pkg/cmd/account/azure-oidc/azure-oidc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package azure

import (
"github.com/MakeNowJust/heredoc/v2"
cmdCreate "github.com/OctopusDeploy/cli/pkg/cmd/account/azure-oidc/create"
cmdList "github.com/OctopusDeploy/cli/pkg/cmd/account/azure-oidc/list"
"github.com/OctopusDeploy/cli/pkg/constants"
"github.com/OctopusDeploy/cli/pkg/factory"
"github.com/spf13/cobra"
)

func NewCmdAzureOidc(f factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "azure-oidc <command>",
Short: "Manage Azure OpenID Connect accounts",
Long: "Manage Azure OpenID Connect accounts in Octopus Deploy",
Example: heredoc.Docf("$ %s account azure-oidc list", constants.ExecutableName),
}

cmd.AddCommand(cmdList.NewCmdList(f))
cmd.AddCommand(cmdCreate.NewCmdCreate(f))

return cmd
}
Loading

0 comments on commit 554d171

Please sign in to comment.