task.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package scheme
  2. type TaskVariable struct {
  3. Key string `json:"key" yaml:"key"`
  4. Value string `json:"value" yaml:"value"`
  5. }
  6. type TaskFile struct {
  7. Path string `json:"path" yaml:"path"`
  8. Content string `json:"content" yaml:"content"`
  9. }
  10. type TaskPreprocessor struct {
  11. Kind string `json:"kind" yaml:"kind"`
  12. }
  13. type TaskImage struct {
  14. Tag string `json:"tag" yaml:"tag"`
  15. Version string `json:"version" yaml:"version"`
  16. Build bool `json:"build" yaml:"build"`
  17. Push bool `json:"push" yam:"push"`
  18. }
  19. type TaskTimeout struct {
  20. Build int `json:"build" yaml:"build"`
  21. Push int `json:"push" yaml:"push"`
  22. }
  23. type Task struct {
  24. Template string `json:"template" yaml:"template"`
  25. Variables []TaskVariable `json:"variables" yaml:"variables"`
  26. Files []TaskFile `json:"files" yaml:"files"`
  27. Preprocessors []TaskPreprocessor `json:"preprocessors" yaml:"preprocessors"`
  28. Image TaskImage `json:"image" yaml:"image"`
  29. Timeout TaskTimeout `json:"timeout" yaml:"timeout"`
  30. }