Documentation
¶
Index ¶
- func NewDockerBuilder(b *basher.Basher) build.Builder
- type Cleanup
- type Docker
- func (d *Docker) AddGlobalEnvs(envs []string)
- func (d *Docker) Close() error
- func (d *Docker) Exec(ctx context.Context, currStage string, currStageStr string, env []string, ...) *pb.Result
- func (d *Docker) Execute(ctx context.Context, stage *pb.Stage, logout chan []byte, commitHash string) *pb.Result
- func (d *Docker) ExecuteIntegration(ctx context.Context, stage *pb.Stage, stgUtil *build.StageUtil, ...) *pb.Result
- func (d *Docker) GetContainerId() string
- func (d *Docker) Init(ctx context.Context, hash string, logout chan []byte) *pb.Result
- func (d *Docker) SetGlobalEnv(envs []string)
- func (d *Docker) Setup(ctx context.Context, logout chan []byte, dockerIdChan chan string, ...) (*pb.Result, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Docker ¶
type Docker struct {
Log io.ReadCloser
ContainerId string
DockerClient *client.Client
*basher.Basher
// contains filtered or unexported fields
}
func CreateLivingDockerContainer ¶
func CreateLivingDockerContainer(t *testing.T, ctx context.Context, imageName string) (d *Docker, clean func(t *testing.T))
CreateLivingDockerContainer will:
- create a docker container with an image from imageName
- tar up the template directory and serve it on :3333 for testing so the container can download the templates we need
- return a cleanup function to defer in your tests
*assumes you have an internet connection and are running docker on linux or mac*
func (*Docker) AddGlobalEnvs ¶
func (*Docker) ExecuteIntegration ¶
func (d *Docker) ExecuteIntegration(ctx context.Context, stage *pb.Stage, stgUtil *build.StageUtil, logout chan []byte) *pb.Result
ExecuteIntegration will basically run Execute but without the cd and run cmds because we are generating the scripts in the code
func (*Docker) GetContainerId ¶
func (*Docker) SetGlobalEnv ¶
Click to show internal directories.
Click to hide internal directories.