@@ -61,10 +61,13 @@ var (
61
61
"cpu_hard_limit" : hclspec .NewAttr ("cpu_hard_limit" , "bool" , false ),
62
62
"cpu_cfs_period" : hclspec .NewAttr ("cpu_cfs_period" , "number" , false ),
63
63
"devices" : hclspec .NewAttr ("devices" , "list(string)" , false ),
64
- "entrypoint" : hclspec .NewAttr ("entrypoint" , "string" , false ),
65
- "working_dir" : hclspec .NewAttr ("working_dir" , "string" , false ),
66
- "hostname" : hclspec .NewAttr ("hostname" , "string" , false ),
67
- "image" : hclspec .NewAttr ("image" , "string" , true ),
64
+
65
+ // Use `any` to maintain backwards compability.
66
+ // Expected type is `list(string)` but may be `string` for old tasks.
67
+ "entrypoint" : hclspec .NewAttr ("entrypoint" , "any" , false ),
68
+ "working_dir" : hclspec .NewAttr ("working_dir" , "string" , false ),
69
+ "hostname" : hclspec .NewAttr ("hostname" , "string" , false ),
70
+ "image" : hclspec .NewAttr ("image" , "string" , true ),
68
71
"image_pull_timeout" : hclspec .NewDefault (
69
72
hclspec .NewAttr ("image_pull_timeout" , "string" , false ),
70
73
hclspec .NewLiteral (`"5m"` ),
@@ -131,18 +134,21 @@ type PluginConfig struct {
131
134
132
135
// TaskConfig is the driver configuration of a task within a job
133
136
type TaskConfig struct {
134
- ApparmorProfile string `codec:"apparmor_profile"`
135
- Args []string `codec:"args"`
136
- Auth AuthConfig `codec:"auth"`
137
- Ports []string `codec:"ports"`
138
- Tmpfs []string `codec:"tmpfs"`
139
- Volumes []string `codec:"volumes"`
140
- CapAdd []string `codec:"cap_add"`
141
- CapDrop []string `codec:"cap_drop"`
142
- SelinuxOpts []string `codec:"selinux_opts"`
143
- Command string `codec:"command"`
144
- Devices []string `codec:"devices"`
145
- Entrypoint string `codec:"entrypoint"`
137
+ ApparmorProfile string `codec:"apparmor_profile"`
138
+ Args []string `codec:"args"`
139
+ Auth AuthConfig `codec:"auth"`
140
+ Ports []string `codec:"ports"`
141
+ Tmpfs []string `codec:"tmpfs"`
142
+ Volumes []string `codec:"volumes"`
143
+ CapAdd []string `codec:"cap_add"`
144
+ CapDrop []string `codec:"cap_drop"`
145
+ SelinuxOpts []string `codec:"selinux_opts"`
146
+ Command string `codec:"command"`
147
+ Devices []string `codec:"devices"`
148
+
149
+ // Use `any` to maintain backwards compability.
150
+ // Expected type is `[]string` but may be `string` for old tasks.
151
+ Entrypoint any `codec:"entrypoint"`
146
152
WorkingDir string `codec:"working_dir"`
147
153
Hostname string `codec:"hostname"`
148
154
Image string `codec:"image"`
0 commit comments