MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / selectRelease

Function selectRelease

pkg/cmd/release/deploy/deploy.go:1082–1091  ·  view source on GitHub ↗
(octopus *octopusApiClient.Client, ask question.Asker, questionText string, space *spaces.Space, project *projects.Project, channel *channels.Channel)

Source from the content-addressed store, hash-verified

1080}
1081
1082func selectRelease(octopus *octopusApiClient.Client, ask question.Asker, questionText string, space *spaces.Space, project *projects.Project, channel *channels.Channel) (*releases.Release, error) {
1083 foundReleases, err := releases.GetReleasesInProjectChannel(octopus, space.ID, project.ID, channel.ID)
1084 if err != nil {
1085 return nil, err
1086 }
1087
1088 return question.SelectMap(ask, questionText, foundReleases, func(p *releases.Release) string {
1089 return p.Version
1090 })
1091}
1092
1093// determineIsTenanted returns true if we are going to do a tenanted deployment, false if untenanted
1094// NOTE: Tenant can be disabled or forced. In these cases we know what to do.

Callers 1

AskQuestionsFunction · 0.85

Calls 1

SelectMapFunction · 0.92

Tested by

no test coverage detected