Documentation
¶
Index ¶
- Constants
- Variables
- func AppendToFile(path, text string, perm os.FileMode) error
- func CopyFile(src, dst string) (err error)
- func Decrypt(key, text []byte) ([]byte, error)
- func Encrypt(key, text []byte) ([]byte, error)
- func FileExists(path string) (bool, error)
- func Flush(object interface{}, outputFile string) error
- func GetEnvMap(envArray []BzkString) map[string][]BzkString
- func ListFilesWithPrefix(source, prefix string) ([]string, error)
- func LoadCryptoKeyFromFile(filePath string) error
- func Parse(file string, object interface{}) error
- func ReadCryptoKey(filePath string) ([]byte, error)
- func RemoveContainer(container *docker.Container)
- func ResolveConfigFile(source string) (string, error)
- func SplitNameValue(s string) (string, string)
- func WaitForTcpConnection(url string, retryEvery, timeout time.Duration) error
- type BzkString
- type Commands
- type Config
- type ConfigMatrix
- type CryptoKey
- type FinishData
- type Globs
- type Image
- type Images
- type Job
- type JobStatus
- type LogEntry
- type MetaKind
- type Person
- type Project
- type ProjectWithStatus
- type SCMMetadata
- type SSHKey
- type Scanner
- type Service
- type StartJob
- type StringValue
- type User
- type Variant
- type VariantMeta
- type VariantMetas
- type YamlTime
Constants ¶
View Source
const ( JOB_SUCCESS JobStatus = "SUCCESS" JOB_FAILED = "FAILED" JOB_ERRORED = "ERRORED" JOB_RUNNING = "RUNNING" )
Variables ¶
View Source
var (
PrivateKey []byte
)
Functions ¶
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func FileExists ¶
func ListFilesWithPrefix ¶
func LoadCryptoKeyFromFile ¶
func ReadCryptoKey ¶
func RemoveContainer ¶
RemoveContainer will cleanly remove a Docker container and warn user of a leak in case of error
func ResolveConfigFile ¶
func SplitNameValue ¶
Types ¶
type BzkString ¶
func FlattenEnvMap ¶
func (BzkString) MarshalYAML ¶
func (*BzkString) UnmarshalYAML ¶
type Config ¶
type Config struct {
Language string `yaml:"language,omitempty"`
Image Images `yaml:"image,omitempty"`
Setup Commands `yaml:"setup,omitempty"`
BeforeInstall Commands `yaml:"before_install,omitempty"`
Install Commands `yaml:"install,omitempty"`
BeforeScript Commands `yaml:"before_script,omitempty"`
Script Commands `yaml:"script,omitempty"`
AfterScript Commands `yaml:"after_script,omitempty"`
AfterSuccess Commands `yaml:"after_success,omitempty"`
AfterFailure Commands `yaml:"after_failure,omitempty"`
Services []Service `yaml:"services,omitempty"`
Env []BzkString `yaml:"env,omitempty"`
FromImage string `yaml:"from"`
Matrix ConfigMatrix `yaml:"matrix,omitempty"`
Archive Globs `yaml:"archive,omitempty"`
ArchiveSuccess Globs `yaml:"archive_success,omitempty"`
ArchiveFailure Globs `yaml:"archive_failure,omitempty"`
}
type ConfigMatrix ¶
type ConfigMatrix struct {
Exclude []map[string]interface{} `yaml:"exclude,omitempty"`
}
type FinishData ¶
type Job ¶
type Job struct {
ID string `bson:"id" json:"id"`
Number int `bson:"number" json:"number"`
ProjectID string `bson:"project_id" json:"project_id"`
OrchestrationID string `bson:"orchestration_id" json:"orchestration_id"`
Started time.Time `bson:"started" json:"started"`
Completed time.Time `bson:"completed" json:"completed"`
Status JobStatus `bson:"status" json:"status"`
SCMMetadata SCMMetadata `bson:"scm_metadata" json:"scm_metadata"`
Parameters []string `bson:"parameters" json:"parameters"`
}
type LogEntry ¶
type LogEntry struct {
ID string `bson:"id" json:"id"`
Message string `bson:"msg" json:"msg"`
Time time.Time `bson:"time" json:"time"`
Level string `bson:"level" json:"level"`
Phase string `bson:"phase" json:"phase"`
Command string `bson:"command" json:"command"`
ProjectID string `bson:"project_id" json:"project_id"`
JobID string `bson:"job_id" json:"job_id"`
VariantID string `bson:"variant_id" json:"variant_id"`
Image string `bson:"image" json:"image"`
}
func ConstructLog ¶
type Project ¶
type Project struct {
ScmType string `bson:"scm_type" json:"scm_type" validate:"required"`
ScmURI string `bson:"scm_uri" json:"scm_uri" validate:"required"`
Name string `bson:"name" json:"name" validate:"required"`
ID string `bson:"id" json:"id"`
HookKey string `bson:"hook_key" json:"hook_key"`
JobCounter int `bson:"job_counter" json:"job_counter"`
Config map[string]string `bson:"config" json:"config"`
}
type ProjectWithStatus ¶
type SCMMetadata ¶
type SCMMetadata struct {
Origin string `bson:"origin" json:"origin" yaml:"origin"`
Reference string `bson:"reference" json:"reference" yaml:"reference"`
CommitID string `bson:"commit_id" json:"commit_id" yaml:"commit_id"`
Author Person `bson:"author" json:"author" yaml:"author"`
Committer Person `bson:"committer" json:"committer" yaml:"committer"`
Date YamlTime `bson:"time" json:"date" yaml:"date"`
Message string `bson:"message" json:"message" yaml:"message"`
}
type StringValue ¶
type StringValue struct {
Value string `bson:"value" json:"value" validate:"required"`
}
type Variant ¶
type Variant struct {
Status JobStatus `bson:"status" json:"status"`
Started time.Time `bson:"started" json:"started"`
Completed time.Time `bson:"completed" json:"completed"`
BuildImage string `bson:"image" json:"image"`
ProjectID string `bson:"project_id" json:"project_id"`
JobID string `bson:"job_id" json:"job_id"`
Number int `bson:"number" json:"number"`
ID string `bson:"id" json:"id"`
Metas *VariantMetas `bson:"metas" json:"metas"`
Artifacts []string `bson:"artifacts" json:"artifacts"`
}
type VariantMeta ¶
type VariantMetas ¶
type VariantMetas []*VariantMeta
func (*VariantMetas) Append ¶
func (ms *VariantMetas) Append(m *VariantMeta)
func (*VariantMetas) Len ¶
func (ms *VariantMetas) Len() int
func (*VariantMetas) Less ¶
func (ms *VariantMetas) Less(i, j int) bool
func (*VariantMetas) Swap ¶
func (ms *VariantMetas) Swap(i, j int)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.