|
64 | 64 | ->param('remove', false, new Boolean(), 'Remove a runtime after execution.', true) |
65 | 65 | ->param('cpus', 1, new FloatValidator(true), 'Container CPU.', true) |
66 | 66 | ->param('memory', 512, new Integer(), 'Container RAM memory.', true) |
67 | | - ->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5') ?? 'v5')), 'Runtime Open Runtime version.', true) |
| 67 | + ->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5'))), 'Runtime Open Runtime version.', true) |
68 | 68 | ->param('restartPolicy', DockerAPI::RESTART_NO, new WhiteList([DockerAPI::RESTART_NO, DockerAPI::RESTART_ALWAYS, DockerAPI::RESTART_ON_FAILURE, DockerAPI::RESTART_UNLESS_STOPPED], true), 'Define restart policy for the runtime once an exit code is returned. Default value is "no". Possible values are "no", "always", "on-failure", "unless-stopped".', true) |
69 | 69 | ->inject('response') |
70 | 70 | ->inject('runner') |
|
155 | 155 | ->param('variables', [], new AnyOf([new Text(65535), new Assoc()], AnyOf::TYPE_MIXED), 'Environment variables passed into runtime.', true) |
156 | 156 | ->param('cpus', 1, new FloatValidator(true), 'Container CPU.', true) |
157 | 157 | ->param('memory', 512, new Integer(true), 'Container RAM memory.', true) |
158 | | - ->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5') ?? 'v5')), 'Runtime Open Runtime version.', true) |
| 158 | + ->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5'))), 'Runtime Open Runtime version.', true) |
159 | 159 | ->param('runtimeEntrypoint', '', new Text(1024, 0), 'Commands to run when creating a container. Maximum of 100 commands are allowed, each 1024 characters long.', true) |
160 | 160 | ->param('logging', true, new Boolean(true), 'Whether executions will be logged.', true) |
161 | 161 | ->param('restartPolicy', DockerAPI::RESTART_NO, new WhiteList([DockerAPI::RESTART_NO, DockerAPI::RESTART_ALWAYS, DockerAPI::RESTART_ON_FAILURE, DockerAPI::RESTART_UNLESS_STOPPED], true), 'Define restart policy once exit code is returned by command. Default value is "no". Possible values are "no", "always", "on-failure", "unless-stopped".', true) |
|
0 commit comments