manifest
v1.1.1
djinn-ci.com/manifest
Documentation
pkg.go.dev ↗Types
Driver
type Driver map[string]string
Driver is used for the driver block in the manifest YAML.
Driver.Scan
func (d *Driver) Scan(val interface{}) error
Driver.String
func (d *Driver) String() string
Driver.Value
func (d Driver) Value() (driver.Value, error)
Job
type Job struct {
Stage string `yaml:",omitempty"`
Name string `yaml:",omitempty"`
Commands []string `yaml:",omitempty"`
Artifacts runner.Passthrough `yaml:",omitempty"`
}
Job is the type that represents a single job to be executed in a build.
Manifest
type Manifest struct {
Namespace string `yaml:",omitempty"`
Driver Driver `yaml:",omitempty"`
Env []string `yaml:",omitempty"`
Objects runner.Passthrough `yaml:",omitempty"`
Sources []Source `yaml:",omitempty"`
Stages []string `yaml:",omitempty"`
AllowFailures []string `yaml:"allow_failures,omitempty"`
Jobs []Job `yaml:",omitempty"`
}
Manifest is the type that represents a manifest for a build. This details the driver to use, variables to set, objects to place, VCS repositories to clone and the actual commands to run and in what order.
Decode
func Decode(r io.Reader) (Manifest, error)
Unmarshal
func Unmarshal(b []byte) (Manifest, error)
Manifest.Scan
func (m *Manifest) Scan(val interface{}) error
Manifest.String
func (m *Manifest) String() string
Manifest.UnmarshalJSON
func (m *Manifest) UnmarshalJSON(b []byte) error
Manifest.UnmarshalText
func (m *Manifest) UnmarshalText(b []byte) error
Manifest.Validate
func (m *Manifest) Validate() error
Manifest.Value
func (m Manifest) Value() (driver.Value, error)
Source
type Source struct {
URL string
Ref string
Dir string
}
Source is the type that represents a VCS repository in a manifest.
Source.MarshalYAML
func (s Source) MarshalYAML() (interface{}, error)
Source.UnmarshalYAML
func (s *Source) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshals the YAML for a source URL. Source URLs can be in the format of:
[url] [ref] => [dir]
This will correctly unmarshal the given string, and parse it accordingly. The ref, and dir parts of the string are optional. If not specified the ref will be master, and the dir will be the base of the url.