Documentation ¶
Index ¶
- func StartGitSmartHTTPServer(t *testing.T, repo *git.Repository) string
- func TCPPort(t *testing.T) *tcpPort
- type EnvironmentBuilder
- type FileSystemStepResourceBuilder
- type FixedResultStep
- type GitRepositoryBuilder
- type GitSmartHTTPServer
- type GitStepResourceBuilder
- func (bldr *GitStepResourceBuilder) Build() *runner.GitStepResource
- func (bldr *GitStepResourceBuilder) WithPath(path ...string) *GitStepResourceBuilder
- func (bldr *GitStepResourceBuilder) WithURL(url string) *GitStepResourceBuilder
- func (bldr *GitStepResourceBuilder) WithVersion(version string) *GitStepResourceBuilder
- type GitWorktreeBuilder
- func (bldr *GitWorktreeBuilder) Commit(commitMsg string) string
- func (bldr *GitWorktreeBuilder) CopyFromDir(fromDir string) *GitWorktreeBuilder
- func (bldr *GitWorktreeBuilder) CreateFile(path string, content string) *GitWorktreeBuilder
- func (bldr *GitWorktreeBuilder) MakeDir(dir string) *GitWorktreeBuilder
- func (bldr *GitWorktreeBuilder) Stage(glob string) *GitWorktreeBuilder
- type GlobalContextBuilder
- type InterpolationCtxBuilder
- type ProtoDefinitionBuilder
- func (bldr *ProtoDefinitionBuilder) Build() *proto.Definition
- func (bldr *ProtoDefinitionBuilder) WithEnvVar(name, value string) *ProtoDefinitionBuilder
- func (bldr *ProtoDefinitionBuilder) WithExecType(workDir string, command []string) *ProtoDefinitionBuilder
- func (bldr *ProtoDefinitionBuilder) WithOutput(name string, value *structpb.Value) *ProtoDefinitionBuilder
- type ProtoSpecBuilder
- type ProtoSpecDefinitionBuilder
- type StepBuilder
- type StepResultBuilder
- func (bldr *StepResultBuilder) Build() *proto.StepResult
- func (bldr *StepResultBuilder) WithFailedStatus() *StepResultBuilder
- func (bldr *StepResultBuilder) WithOutput(name string, value *structpb.Value) *StepResultBuilder
- func (bldr *StepResultBuilder) WithSpecDef(specDef *proto.SpecDefinition) *StepResultBuilder
- func (bldr *StepResultBuilder) WithSuccessStatus() *StepResultBuilder
- type StepsContextBuilder
- func (bldr *StepsContextBuilder) Build() *runner.StepsContext
- func (bldr *StepsContextBuilder) WithEnv(key, value string) *StepsContextBuilder
- func (bldr *StepsContextBuilder) WithGlobalContext(globalCtx *runner.GlobalContext) *StepsContextBuilder
- func (bldr *StepsContextBuilder) WithInput(name string, value *structpb.Value) *StepsContextBuilder
- func (bldr *StepsContextBuilder) WithStepResults(stepResults map[string]*proto.StepResult) *StepsContextBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartGitSmartHTTPServer ¶
StartGitSmartHTTPServer starts a Git Smart HTTP Server. Pushing to the Git Server is not supported. Shallow clones are not supported. Not thread-safe.
Types ¶
type EnvironmentBuilder ¶ added in v0.2.0
type EnvironmentBuilder struct {
// contains filtered or unexported fields
}
func Env ¶ added in v0.2.0
func Env() *EnvironmentBuilder
func (*EnvironmentBuilder) Build ¶ added in v0.2.0
func (bldr *EnvironmentBuilder) Build() *runner.Environment
type FileSystemStepResourceBuilder ¶
type FileSystemStepResourceBuilder struct { }
func FileSystemStepResource ¶
func FileSystemStepResource() *FileSystemStepResourceBuilder
func (*FileSystemStepResourceBuilder) Build ¶
func (bldr *FileSystemStepResourceBuilder) Build() *runner.FileSystemStepResource
type FixedResultStep ¶
type FixedResultStep struct {
// contains filtered or unexported fields
}
func (*FixedResultStep) Describe ¶
func (s *FixedResultStep) Describe() string
func (*FixedResultStep) Run ¶
func (s *FixedResultStep) Run(_ context.Context, _ *runner.StepsContext) (*proto.StepResult, error)
type GitRepositoryBuilder ¶
type GitRepositoryBuilder struct {
// contains filtered or unexported fields
}
func GitRepository ¶
func GitRepository() *GitRepositoryBuilder
func (*GitRepositoryBuilder) Build ¶
func (bldr *GitRepositoryBuilder) Build(t *testing.T) (*git.Repository, *git.Worktree)
func (*GitRepositoryBuilder) InitWithFilesFromDir ¶
func (bldr *GitRepositoryBuilder) InitWithFilesFromDir(path string) *GitRepositoryBuilder
type GitSmartHTTPServer ¶
type GitSmartHTTPServer struct {
// contains filtered or unexported fields
}
func NewGitSmartHTTPServer ¶
func NewGitSmartHTTPServer(listener net.Listener, repo *git.Repository) *GitSmartHTTPServer
func (*GitSmartHTTPServer) Close ¶
func (s *GitSmartHTTPServer) Close()
func (*GitSmartHTTPServer) Serve ¶
func (s *GitSmartHTTPServer) Serve()
type GitStepResourceBuilder ¶
type GitStepResourceBuilder struct {
// contains filtered or unexported fields
}
func GitStepResource ¶
func GitStepResource() *GitStepResourceBuilder
func (*GitStepResourceBuilder) Build ¶
func (bldr *GitStepResourceBuilder) Build() *runner.GitStepResource
func (*GitStepResourceBuilder) WithPath ¶
func (bldr *GitStepResourceBuilder) WithPath(path ...string) *GitStepResourceBuilder
func (*GitStepResourceBuilder) WithURL ¶
func (bldr *GitStepResourceBuilder) WithURL(url string) *GitStepResourceBuilder
func (*GitStepResourceBuilder) WithVersion ¶
func (bldr *GitStepResourceBuilder) WithVersion(version string) *GitStepResourceBuilder
type GitWorktreeBuilder ¶
type GitWorktreeBuilder struct {
// contains filtered or unexported fields
}
func GitWorktree ¶
func GitWorktree(t *testing.T, worktree *git.Worktree) *GitWorktreeBuilder
func (*GitWorktreeBuilder) Commit ¶
func (bldr *GitWorktreeBuilder) Commit(commitMsg string) string
func (*GitWorktreeBuilder) CopyFromDir ¶
func (bldr *GitWorktreeBuilder) CopyFromDir(fromDir string) *GitWorktreeBuilder
func (*GitWorktreeBuilder) CreateFile ¶
func (bldr *GitWorktreeBuilder) CreateFile(path string, content string) *GitWorktreeBuilder
func (*GitWorktreeBuilder) MakeDir ¶
func (bldr *GitWorktreeBuilder) MakeDir(dir string) *GitWorktreeBuilder
func (*GitWorktreeBuilder) Stage ¶
func (bldr *GitWorktreeBuilder) Stage(glob string) *GitWorktreeBuilder
type GlobalContextBuilder ¶
type GlobalContextBuilder struct {
// contains filtered or unexported fields
}
func GlobalContext ¶
func GlobalContext() *GlobalContextBuilder
func (*GlobalContextBuilder) Build ¶
func (bldr *GlobalContextBuilder) Build() *runner.GlobalContext
func (*GlobalContextBuilder) WithJob ¶
func (bldr *GlobalContextBuilder) WithJob(name, value string) *GlobalContextBuilder
type InterpolationCtxBuilder ¶
type InterpolationCtxBuilder struct {
// contains filtered or unexported fields
}
func InterpolationCtx ¶
func InterpolationCtx() *InterpolationCtxBuilder
func (*InterpolationCtxBuilder) Build ¶
func (bldr *InterpolationCtxBuilder) Build() *expression.InterpolationContext
func (*InterpolationCtxBuilder) WithEnvVar ¶
func (bldr *InterpolationCtxBuilder) WithEnvVar(name, value string) *InterpolationCtxBuilder
type ProtoDefinitionBuilder ¶
type ProtoDefinitionBuilder struct {
// contains filtered or unexported fields
}
func ProtoDef ¶
func ProtoDef() *ProtoDefinitionBuilder
func (*ProtoDefinitionBuilder) Build ¶
func (bldr *ProtoDefinitionBuilder) Build() *proto.Definition
func (*ProtoDefinitionBuilder) WithEnvVar ¶
func (bldr *ProtoDefinitionBuilder) WithEnvVar(name, value string) *ProtoDefinitionBuilder
func (*ProtoDefinitionBuilder) WithExecType ¶
func (bldr *ProtoDefinitionBuilder) WithExecType(workDir string, command []string) *ProtoDefinitionBuilder
func (*ProtoDefinitionBuilder) WithOutput ¶
func (bldr *ProtoDefinitionBuilder) WithOutput(name string, value *structpb.Value) *ProtoDefinitionBuilder
type ProtoSpecBuilder ¶
type ProtoSpecBuilder struct {
// contains filtered or unexported fields
}
func ProtoSpec ¶
func ProtoSpec() *ProtoSpecBuilder
func (*ProtoSpecBuilder) Build ¶
func (bldr *ProtoSpecBuilder) Build() *proto.Spec
func (*ProtoSpecBuilder) WithOutputMethod ¶
func (bldr *ProtoSpecBuilder) WithOutputMethod(outputMethod proto.OutputMethod) *ProtoSpecBuilder
func (*ProtoSpecBuilder) WithOutputSpec ¶
func (bldr *ProtoSpecBuilder) WithOutputSpec(outputSpec map[string]*proto.Spec_Content_Output) *ProtoSpecBuilder
type ProtoSpecDefinitionBuilder ¶
type ProtoSpecDefinitionBuilder struct {
// contains filtered or unexported fields
}
func ProtoSpecDef ¶
func ProtoSpecDef() *ProtoSpecDefinitionBuilder
func (*ProtoSpecDefinitionBuilder) Build ¶
func (bldr *ProtoSpecDefinitionBuilder) Build() *proto.SpecDefinition
func (*ProtoSpecDefinitionBuilder) WithDefinition ¶
func (bldr *ProtoSpecDefinitionBuilder) WithDefinition(definition *proto.Definition) *ProtoSpecDefinitionBuilder
func (*ProtoSpecDefinitionBuilder) WithSpec ¶
func (bldr *ProtoSpecDefinitionBuilder) WithSpec(spec *proto.Spec) *ProtoSpecDefinitionBuilder
type StepBuilder ¶
type StepBuilder struct {
// contains filtered or unexported fields
}
func Step ¶
func Step() *StepBuilder
func (*StepBuilder) Build ¶
func (bldr *StepBuilder) Build() *FixedResultStep
func (*StepBuilder) WithRunReturnsErr ¶
func (bldr *StepBuilder) WithRunReturnsErr(err error) *StepBuilder
func (*StepBuilder) WithRunReturnsStepResult ¶
func (bldr *StepBuilder) WithRunReturnsStepResult(stepResult *proto.StepResult) *StepBuilder
type StepResultBuilder ¶
type StepResultBuilder struct {
// contains filtered or unexported fields
}
func StepResult ¶
func StepResult() *StepResultBuilder
func (*StepResultBuilder) Build ¶
func (bldr *StepResultBuilder) Build() *proto.StepResult
func (*StepResultBuilder) WithFailedStatus ¶
func (bldr *StepResultBuilder) WithFailedStatus() *StepResultBuilder
func (*StepResultBuilder) WithOutput ¶
func (bldr *StepResultBuilder) WithOutput(name string, value *structpb.Value) *StepResultBuilder
func (*StepResultBuilder) WithSpecDef ¶
func (bldr *StepResultBuilder) WithSpecDef(specDef *proto.SpecDefinition) *StepResultBuilder
func (*StepResultBuilder) WithSuccessStatus ¶
func (bldr *StepResultBuilder) WithSuccessStatus() *StepResultBuilder
type StepsContextBuilder ¶
type StepsContextBuilder struct {
// contains filtered or unexported fields
}
func StepsContext ¶
func StepsContext(t *testing.T) *StepsContextBuilder
func (*StepsContextBuilder) Build ¶
func (bldr *StepsContextBuilder) Build() *runner.StepsContext
func (*StepsContextBuilder) WithEnv ¶
func (bldr *StepsContextBuilder) WithEnv(key, value string) *StepsContextBuilder
func (*StepsContextBuilder) WithGlobalContext ¶
func (bldr *StepsContextBuilder) WithGlobalContext(globalCtx *runner.GlobalContext) *StepsContextBuilder
func (*StepsContextBuilder) WithInput ¶
func (bldr *StepsContextBuilder) WithInput(name string, value *structpb.Value) *StepsContextBuilder
func (*StepsContextBuilder) WithStepResults ¶
func (bldr *StepsContextBuilder) WithStepResults(stepResults map[string]*proto.StepResult) *StepsContextBuilder
Source Files ¶
- environment.go
- file_system_step_resource_builder.go
- git_repository_builder.go
- git_smart_http_server.go
- git_step_resource_builder.go
- git_worktree.go
- global_context_builder.go
- interpolation_context_builder.go
- proto_def_builder.go
- proto_spec_builder.go
- proto_spec_def_builder.go
- step_builder.go
- step_result_builder.go
- steps_context_builder.go
- tcp_port.go
Click to show internal directories.
Click to hide internal directories.