Documentation
¶
Overview ¶
Package codebuild emulates AWS CodeBuild over JSON 1.1: projects (with report groups and webhooks as metadata) and builds that run real buildspecs in Docker, with the source from S3, git or none, logs in CloudWatch Logs and artifacts in S3.
Index ¶
- Constants
- type Artifacts
- type Build
- type Context
- type EnvVar
- type Environment
- type Logs
- type Output
- type Phase
- type Project
- type Service
- func (s *Service) Close() error
- func (s *Service) Info() core.Info
- func (s *Service) Inspect(table, id string) any
- func (s *Service) Load(b []byte) error
- func (s *Service) Reset()
- func (s *Service) Resources() []core.Table
- func (s *Service) Save() ([]byte, error)
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Source
Constants ¶
const NoDocker = "pogi: Docker is not available, so builds cannot run"
NoDocker is the phase context of builds that cannot run.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifacts ¶
type Artifacts struct {
Type string `json:"type"`
Location string `json:"location,omitempty"`
Path string `json:"path,omitempty"`
Name string `json:"name,omitempty"`
NamespaceType string `json:"namespaceType,omitempty"`
Packaging string `json:"packaging,omitempty"`
}
Artifacts is where a project's output goes.
type Build ¶
type Build struct {
ID string `json:"id"`
Arn string `json:"arn"`
BuildNumber int64 `json:"buildNumber"`
StartTime core.Time `json:"startTime"`
EndTime *core.Time `json:"endTime,omitempty"`
CurrentPhase string `json:"currentPhase"`
BuildStatus string `json:"buildStatus"`
BuildComplete bool `json:"buildComplete"`
ProjectName string `json:"projectName"`
SourceVersion string `json:"sourceVersion,omitempty"`
ResolvedSourceVersion string `json:"resolvedSourceVersion,omitempty"`
Phases []*Phase `json:"phases"`
Source Source `json:"source"`
Environment Environment `json:"environment"`
Artifacts *Output `json:"artifacts,omitempty"`
Logs *Logs `json:"logs,omitempty"`
ServiceRole string `json:"serviceRole,omitempty"`
TimeoutInMinutes int `json:"timeoutInMinutes"`
QueuedTimeoutInMinutes int `json:"queuedTimeoutInMinutes"`
Initiator string `json:"initiator,omitempty"`
EncryptionKey string `json:"encryptionKey,omitempty"`
}
Build is one run of a project, in the API's shape.
type EnvVar ¶
type EnvVar struct {
Name string `json:"name"`
Value string `json:"value"`
Type string `json:"type,omitempty"`
}
EnvVar is an environment variable: PLAINTEXT, PARAMETER_STORE or SECRETS_MANAGER.
type Environment ¶
type Environment struct {
Type string `json:"type"`
Image string `json:"image"`
ComputeType string `json:"computeType"`
EnvironmentVariables []EnvVar `json:"environmentVariables,omitempty"`
PrivilegedMode bool `json:"privilegedMode"`
ImagePullCredentialsType string `json:"imagePullCredentialsType,omitempty"`
}
Environment is a build's container.
type Logs ¶
type Logs struct {
GroupName string `json:"groupName"`
StreamName string `json:"streamName"`
DeepLink string `json:"deepLink"`
Arn string `json:"cloudWatchLogsArn"`
}
Logs is where a build logs to.
type Output ¶
type Output struct {
Location string `json:"location"`
Sha256sum string `json:"sha256sum,omitempty"`
Md5sum string `json:"md5sum,omitempty"`
}
Output is where a build's artifacts went.
type Phase ¶
type Phase struct {
Type string `json:"phaseType"`
Status string `json:"phaseStatus,omitempty"`
Start core.Time `json:"startTime"`
End *core.Time `json:"endTime,omitempty"`
Duration *int64 `json:"durationInSeconds,omitempty"`
Contexts []Context `json:"contexts,omitempty"`
}
Phase is one step of a build.
type Project ¶
Project is a build project as the API shows it: as given, plus what CodeBuild fills in.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the CodeBuild emulator.