You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Extend tag sets and add environment tags (#548)
* feat: Extend tag sets and add environment tags
* feat: Add tag set scope validation and feedback for single tag/tenant prompt
* fix: tags in tests were incorrect
flags.StringArrayVarP(&createFlags.Tag.Value, createFlags.Tag.Name, "t", []string{}, "Tag to apply to environment, must use canonical name: <tag_set>/<tag_name>")
_, err=promptBool(opts, &opts.GuidedFailureMode.Value, false, "Use guided failure", "If guided failure is enabled for an environment, Octopus Deploy will prompt for user intervention if a deployment fails in the environment.")
123
146
_, err=promptBool(opts, &opts.DynamicInfrastructure.Value, false, "Allow dynamic infrastructure", "If dynamic infrastructure is enabled for an environment, deployments to this environment are allowed to create infrastructure, such as targets and accounts.")
flags.StringArrayVarP(&createFlags.Tag.Value, createFlags.Tag.Name, "t", []string{}, "Tag to apply to environment, must use canonical name: <tag_set>/<tag_name>")
53
+
flags.StringVar(&createFlags.Environment.Value, createFlags.Environment.Name, "", "Name or ID of the environment you wish to update")
funcAskEnvironments(ask question.Asker, out io.Writer, valuestring, getEnvironmentsCallbackGetEnvironmentsCallback, getEnvironmentCallbackGetEnvironmentCallback) (*environments.Environment, error) {
122
+
ifvalue!="" {
123
+
environment, err:=getEnvironmentCallback(value)
124
+
iferr!=nil {
125
+
returnnil, err
126
+
}
127
+
returnenvironment, nil
128
+
}
129
+
130
+
// Check if there's only one environment
131
+
envs, err:=getEnvironmentsCallback()
132
+
iferr!=nil {
133
+
returnnil, err
134
+
}
135
+
iflen(envs) ==1 {
136
+
fmt.Fprintf(out, "Selecting only available environment '%s'.\n", output.Cyan(envs[0].Name))
137
+
returnenvs[0], nil
138
+
}
139
+
140
+
environment, err:=selectors.Select(ask, "Select the Environment you would like to update", getEnvironmentsCallback, func(item*environments.Environment) string {
0 commit comments