| 1028 | } |
| 1029 | |
| 1030 | func PrintAdvancedSummary(stdout io.Writer, options *executor.TaskOptionsDeployRelease) { |
| 1031 | deployAtStr := "Now" |
| 1032 | if options.ScheduledStartTime != "" { |
| 1033 | deployAtStr = options.ScheduledStartTime // we assume the server is going to understand this |
| 1034 | } |
| 1035 | skipStepsStr := "None" |
| 1036 | if len(options.ExcludedSteps) > 0 { |
| 1037 | skipStepsStr = strings.Join(options.ExcludedSteps, ",") |
| 1038 | } |
| 1039 | |
| 1040 | gfmStr := executionscommon.LookupGuidedFailureModeString(options.GuidedFailureMode) |
| 1041 | |
| 1042 | pkgDownloadStr := executionscommon.LookupPackageDownloadString(!options.ForcePackageDownload) |
| 1043 | |
| 1044 | depTargetsStr := "All included" |
| 1045 | if len(options.DeploymentTargets) != 0 || len(options.ExcludeTargets) != 0 { |
| 1046 | sb := strings.Builder{} |
| 1047 | if len(options.DeploymentTargets) > 0 { |
| 1048 | sb.WriteString("Include ") |
| 1049 | for idx, name := range options.DeploymentTargets { |
| 1050 | if idx > 0 { |
| 1051 | sb.WriteString(",") |
| 1052 | } |
| 1053 | sb.WriteString(name) |
| 1054 | } |
| 1055 | } |
| 1056 | if len(options.ExcludeTargets) > 0 { |
| 1057 | if sb.Len() > 0 { |
| 1058 | sb.WriteString("; ") |
| 1059 | } |
| 1060 | |
| 1061 | sb.WriteString("Exclude ") |
| 1062 | for idx, name := range options.ExcludeTargets { |
| 1063 | if idx > 0 { |
| 1064 | sb.WriteString(",") |
| 1065 | } |
| 1066 | sb.WriteString(name) |
| 1067 | } |
| 1068 | } |
| 1069 | depTargetsStr = sb.String() |
| 1070 | } |
| 1071 | |
| 1072 | _, _ = fmt.Fprintf(stdout, output.FormatDoc(heredoc.Doc(` |
| 1073 | bold(Additional Options): |
| 1074 | Deploy Time: cyan(%s) |
| 1075 | Skipped Steps: cyan(%s) |
| 1076 | Guided Failure Mode: cyan(%s) |
| 1077 | Package Download: cyan(%s) |
| 1078 | Deployment Targets: cyan(%s) |
| 1079 | `)), deployAtStr, skipStepsStr, gfmStr, pkgDownloadStr, depTargetsStr) |
| 1080 | } |
| 1081 | |
| 1082 | func 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) |