File tree 4 files changed +23
-2
lines changed 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ func (r *RootCmd) create() *clibase.Cmd {
23
23
startAt string
24
24
stopAfter time.Duration
25
25
workspaceName string
26
+ buildOptions bool
26
27
)
27
28
client := new (codersdk.Client )
28
29
cmd := & clibase.Cmd {
@@ -123,6 +124,7 @@ func (r *RootCmd) create() *clibase.Cmd {
123
124
Template : template ,
124
125
RichParameterFile : richParameterFile ,
125
126
NewWorkspaceName : workspaceName ,
127
+ BuildOptions : buildOptions ,
126
128
})
127
129
if err != nil {
128
130
return xerrors .Errorf ("prepare build: %w" , err )
@@ -189,6 +191,11 @@ func (r *RootCmd) create() *clibase.Cmd {
189
191
Description : "Specify a duration after which the workspace should shut down (e.g. 8h)." ,
190
192
Value : clibase .DurationOf (& stopAfter ),
191
193
},
194
+ clibase.Option {
195
+ Flag : "build-options" ,
196
+ Description : "Prompt for one-time build options defined with ephemeral parameters." ,
197
+ Value : clibase .BoolOf (& buildOptions ),
198
+ },
192
199
cliui .SkipPromptOption (),
193
200
)
194
201
@@ -202,6 +209,7 @@ type prepWorkspaceBuildArgs struct {
202
209
NewWorkspaceName string
203
210
204
211
UpdateWorkspace bool
212
+ BuildOptions bool
205
213
WorkspaceID uuid.UUID
206
214
}
207
215
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ Usage: coder create [flags] [name]
3
3
Create a workspace
4
4
5
5
[1mOptions[0m
6
+ --build-options bool
7
+ Prompt for one-time build options defined with ephemeral parameters.
8
+
6
9
--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
7
10
Specify a file path with values for rich parameters defined in the
8
11
template.
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ Use --always-prompt to change the parameter values of the workspace.
9
9
Always prompt all parameters. Does not pull parameter values from
10
10
existing workspace.
11
11
12
+ --build-options bool
13
+ Prompt for one-time build options defined with ephemeral parameters.
14
+
12
15
--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
13
16
Specify a file path with values for rich parameters defined in the
14
17
template.
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ func (r *RootCmd) update() *clibase.Cmd {
11
11
var (
12
12
richParameterFile string
13
13
alwaysPrompt bool
14
+ buildOptions bool
14
15
)
15
16
16
17
client := new (codersdk.Client )
@@ -53,6 +54,8 @@ func (r *RootCmd) update() *clibase.Cmd {
53
54
54
55
UpdateWorkspace : true ,
55
56
WorkspaceID : workspace .LatestBuild .ID ,
57
+
58
+ BuildOptions : buildOptions ,
56
59
})
57
60
if err != nil {
58
61
return nil
@@ -86,15 +89,19 @@ func (r *RootCmd) update() *clibase.Cmd {
86
89
{
87
90
Flag : "always-prompt" ,
88
91
Description : "Always prompt all parameters. Does not pull parameter values from existing workspace." ,
89
-
90
- Value : clibase .BoolOf (& alwaysPrompt ),
92
+ Value : clibase .BoolOf (& alwaysPrompt ),
91
93
},
92
94
{
93
95
Flag : "rich-parameter-file" ,
94
96
Description : "Specify a file path with values for rich parameters defined in the template." ,
95
97
Env : "CODER_RICH_PARAMETER_FILE" ,
96
98
Value : clibase .StringOf (& richParameterFile ),
97
99
},
100
+ {
101
+ Flag : "build-options" ,
102
+ Description : "Prompt for one-time build options defined with ephemeral parameters." ,
103
+ Value : clibase .BoolOf (& buildOptions ),
104
+ },
98
105
}
99
106
return cmd
100
107
}
You can’t perform that action at this time.
0 commit comments