Documentation ¶
Index ¶
- Constants
- func EncodeBuildEvent(be BuildEvent) (p []byte, err error)
- func EncodeBuildJob(bj BuildJob) (p []byte, err error)
- func EncodeDeployJob(dj DeployJob) (p []byte, err error)
- func EncodePostDeployJob(pdj PostDeployJob) (p []byte, err error)
- func EncodeSecretsJob(sj SecretsJob) (p []byte, err error)
- type Baghdad
- type Branch
- type BuildEvent
- type BuildJob
- type DeployJob
- type PostDeploy
- type PostDeployJob
- type SecretsJob
- type Service
Constants ¶
const ( // PushEvent enum PushEvent = 1 + iota // PullRequestEvent enum PullRequestEvent // BuildSuccessEvent enum BuildSuccessEvent // BuildFailureEvent enum BuildFailureEvent )
Variables ¶
This section is empty.
Functions ¶
func EncodeBuildEvent ¶
func EncodeBuildEvent(be BuildEvent) (p []byte, err error)
EncodeBuildEvent is used to serialize a BuildEvent to a rabbitmq msg
func EncodeBuildJob ¶
EncodeBuildJob is used to serialize a BuildJob for a rabbitmq msg
func EncodeDeployJob ¶
EncodeDeployJob is used to serialize a DeployJob to a rabbitmq msg
func EncodePostDeployJob ¶
func EncodePostDeployJob(pdj PostDeployJob) (p []byte, err error)
EncodePostDeployJob is used to serialize a PostDeployJob to a rabbitmq msg
func EncodeSecretsJob ¶
func EncodeSecretsJob(sj SecretsJob) (p []byte, err error)
EncodeSecretsJob is used to serialize a SecretsJob to a rabbitmq msg
Types ¶
type Baghdad ¶
type Baghdad struct { Project string `toml:"project"` SlackURL string `toml:"slack-url"` Services []Service `toml:"services"` Environments map[string]string `toml:"environments"` Branches map[string]Branch `toml:"branches"` PostDeploy PostDeploy `toml:"post-deploy"` }
Baghdad top level config
type BuildEvent ¶
BuildEvent is used at the end of a build to let subscribes know if a build failed/succeeded.
func DecodeBuildEvent ¶
func DecodeBuildEvent(p []byte) (be BuildEvent, err error)
DecodeBuildEvent is used to parse a BuildEvent from a rabbitmq msg
type BuildJob ¶
type BuildJob struct { Baghdad Baghdad BranchName string GitURL string PRNum int RepoName string RepoOwner string SHA string Type int // use PushEvent/PullEvent enums Service Service NextTag string ErrString string LogID string }
BuildJob use to send a build job to the build worker
func DecodeBuildJob ¶
DecodeBuildJob is used to parse a BuildJob from a rabbitmq msg
type DeployJob ¶
type DeployJob struct { Baghdad Baghdad BranchName string Env string RepoName string Tag string RepoOwner string LogID string }
DeployJob use to send a deploy job to the deploy worker
func DecodeDeployJob ¶
DecodeDeployJob is used to parse a DeployJob from a rabbitmq msg
type PostDeploy ¶
type PostDeploy struct { SourceService string `toml:"source-service"` TargetService string `toml:"target-service"` Secrets string `toml:"secrets"` Environments []string `toml:"environments"` }
PostDeploy config
type PostDeployJob ¶
type PostDeployJob struct { Baghdad Baghdad ProjectName string Tag string Env string BranchName string SiteURL string }
PostDeployJob use to send a post deploy job to rabbitmq
func DecodePostDeployJob ¶
func DecodePostDeployJob(p []byte) (pdj PostDeployJob, err error)
DecodePostDeployJob is used to parse a DeployJob from a rabbitmq msg
type SecretsJob ¶
SecretsJob use to save a secret to swarm.
func DecodeSecretsJob ¶
func DecodeSecretsJob(p []byte) (sj SecretsJob, err error)
DecodeSecretsJob is used to parse a SecretsJob from a rabbitmq msg
type Service ¶
type Service struct { Name string `toml:"name"` Dockerfile string `toml:"dockerfile"` IsExposed bool `toml:"isExposed"` Port string `toml:"port"` Image string `toml:"image"` IsExternal bool `toml:"isExternal"` HasArtifacts bool `toml:"hasArtifacts"` ArtifactsPath string `toml:"artifactsPath"` }
Service config
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package services is a generated protocol buffer package.
|
Package services is a generated protocol buffer package. |