| 136 | } |
| 137 | |
| 138 | func validateRequire(config *latest.Config) error { |
| 139 | for index, plugin := range config.Require.Plugins { |
| 140 | if plugin.Name == "" { |
| 141 | return errors.Errorf("require.plugins[%d].name is required", index) |
| 142 | } |
| 143 | if plugin.Version == "" { |
| 144 | return errors.Errorf("require.plugins[%d].version is required", index) |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | for index, command := range config.Require.Commands { |
| 149 | if command.Name == "" { |
| 150 | return errors.Errorf("require.commands[%d].name is required", index) |
| 151 | } |
| 152 | if command.Version == "" { |
| 153 | return errors.Errorf("require.commands[%d].version is required", index) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | return nil |
| 158 | } |
| 159 | |
| 160 | func validatePipelines(config *latest.Config) error { |
| 161 | for name := range config.Pipelines { |