Documentation
¶
Index ¶
- func BuildImage(ctx context.Context, dockerfile string, tag string, buildContext string) error
- func PushImage(ctx context.Context, tag string) error
- type Exporter
- type ExporterService
- func (e *ExporterService) CreateImageTag(registry string, imagePrefix string, serviceName string) (string, error)
- func (e *ExporterService) ExportDockerArtifacts() error
- func (e *ExporterService) ExportImages(ctx context.Context, registry string, imagePrefix string) error
- func (e *ExporterService) ExportKubernetesArtifacts(registry string, imagePrefix string, namespace string, pullSecret string, ...) error
- func (e *ExporterService) GetExportDir() string
- func (e *ExporterService) GetKubernetesDir() string
- func (e *ExporterService) ReadYmlFile(path string) (*ci.CiYml, error)
- type MockExporter
- func (_m *MockExporter) EXPECT() *MockExporter_Expecter
- func (_mock *MockExporter) ExportDockerArtifacts() error
- func (_mock *MockExporter) ExportImages(ctx context.Context, registry string, imagePrefix string) error
- func (_mock *MockExporter) ExportKubernetesArtifacts(registry string, image string, namespace string, pullSecret string, ...) error
- func (_mock *MockExporter) ReadYmlFile(path string) (*ci.CiYml, error)
- type MockExporter_Expecter
- func (_e *MockExporter_Expecter) ExportDockerArtifacts() *MockExporter_ExportDockerArtifacts_Call
- func (_e *MockExporter_Expecter) ExportImages(ctx interface{}, registry interface{}, imagePrefix interface{}) *MockExporter_ExportImages_Call
- func (_e *MockExporter_Expecter) ExportKubernetesArtifacts(registry interface{}, image interface{}, namespace interface{}, ...) *MockExporter_ExportKubernetesArtifacts_Call
- func (_e *MockExporter_Expecter) ReadYmlFile(path interface{}) *MockExporter_ReadYmlFile_Call
- type MockExporter_ExportDockerArtifacts_Call
- func (_c *MockExporter_ExportDockerArtifacts_Call) Return(err error) *MockExporter_ExportDockerArtifacts_Call
- func (_c *MockExporter_ExportDockerArtifacts_Call) Run(run func()) *MockExporter_ExportDockerArtifacts_Call
- func (_c *MockExporter_ExportDockerArtifacts_Call) RunAndReturn(run func() error) *MockExporter_ExportDockerArtifacts_Call
- type MockExporter_ExportImages_Call
- func (_c *MockExporter_ExportImages_Call) Return(err error) *MockExporter_ExportImages_Call
- func (_c *MockExporter_ExportImages_Call) Run(run func(ctx context.Context, registry string, imagePrefix string)) *MockExporter_ExportImages_Call
- func (_c *MockExporter_ExportImages_Call) RunAndReturn(run func(ctx context.Context, registry string, imagePrefix string) error) *MockExporter_ExportImages_Call
- type MockExporter_ExportKubernetesArtifacts_Call
- func (_c *MockExporter_ExportKubernetesArtifacts_Call) Return(err error) *MockExporter_ExportKubernetesArtifacts_Call
- func (_c *MockExporter_ExportKubernetesArtifacts_Call) Run(...) *MockExporter_ExportKubernetesArtifacts_Call
- func (_c *MockExporter_ExportKubernetesArtifacts_Call) RunAndReturn(...) *MockExporter_ExportKubernetesArtifacts_Call
- type MockExporter_ReadYmlFile_Call
- func (_c *MockExporter_ReadYmlFile_Call) Return(ciYml *ci.CiYml, err error) *MockExporter_ReadYmlFile_Call
- func (_c *MockExporter_ReadYmlFile_Call) Run(run func(path string)) *MockExporter_ReadYmlFile_Call
- func (_c *MockExporter_ReadYmlFile_Call) RunAndReturn(run func(path string) (*ci.CiYml, error)) *MockExporter_ReadYmlFile_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImage ¶
Types ¶
type Exporter ¶
type Exporter interface {
ReadYmlFile(path string) (*ci.CiYml, error)
ExportDockerArtifacts() error
ExportKubernetesArtifacts(registry string, image string, namespace string, pullSecret string, hostname string, ingressClass string) error
ExportImages(ctx context.Context, registry string, imagePrefix string) error
}
func NewExporterService ¶
type ExporterService ¶
type ExporterService struct {
// contains filtered or unexported fields
}
func (*ExporterService) CreateImageTag ¶
func (e *ExporterService) CreateImageTag(registry string, imagePrefix string, serviceName string) (string, error)
CreateImageTag creates a Docker image tag from the registry, image prefix and service name. It returns the full image tag in the format: <registry>/<imagePrefix>-<serviceName>:latest.
func (*ExporterService) ExportDockerArtifacts ¶
func (e *ExporterService) ExportDockerArtifacts() error
ExportDockerArtifacts exports Docker artifacts based on the provided input path, output path, base image, and environment variables. ReadYmlFile has to be called before this method.
func (*ExporterService) ExportImages ¶
func (e *ExporterService) ExportImages(ctx context.Context, registry string, imagePrefix string) error
ExportImages builds and pushes Docker images for each service defined in the CI YML file. ExportDockerArtifacts has to be called before this method.
func (*ExporterService) ExportKubernetesArtifacts ¶
func (e *ExporterService) ExportKubernetesArtifacts(registry string, imagePrefix string, namespace string, pullSecret string, hostname string, ingressClass string) error
ExportKubernetesArtifacts generates Kubernetes artifacts for each service defined in the CI YML file. ExportDockerArtifacts has to be called before this method.
func (*ExporterService) GetExportDir ¶
func (e *ExporterService) GetExportDir() string
func (*ExporterService) GetKubernetesDir ¶
func (e *ExporterService) GetKubernetesDir() string
func (*ExporterService) ReadYmlFile ¶
func (e *ExporterService) ReadYmlFile(path string) (*ci.CiYml, error)
ReadYmlFile reads the CI YML file from the given path.
type MockExporter ¶
MockExporter is an autogenerated mock type for the Exporter type
func NewMockExporter ¶
func NewMockExporter(t interface {
mock.TestingT
Cleanup(func())
}) *MockExporter
NewMockExporter creates a new instance of MockExporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockExporter) EXPECT ¶
func (_m *MockExporter) EXPECT() *MockExporter_Expecter
func (*MockExporter) ExportDockerArtifacts ¶
func (_mock *MockExporter) ExportDockerArtifacts() error
ExportDockerArtifacts provides a mock function for the type MockExporter
func (*MockExporter) ExportImages ¶
func (_mock *MockExporter) ExportImages(ctx context.Context, registry string, imagePrefix string) error
ExportImages provides a mock function for the type MockExporter
func (*MockExporter) ExportKubernetesArtifacts ¶
func (_mock *MockExporter) ExportKubernetesArtifacts(registry string, image string, namespace string, pullSecret string, hostname string, ingressClass string) error
ExportKubernetesArtifacts provides a mock function for the type MockExporter
func (*MockExporter) ReadYmlFile ¶
func (_mock *MockExporter) ReadYmlFile(path string) (*ci.CiYml, error)
ReadYmlFile provides a mock function for the type MockExporter
type MockExporter_Expecter ¶
type MockExporter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockExporter_Expecter) ExportDockerArtifacts ¶
func (_e *MockExporter_Expecter) ExportDockerArtifacts() *MockExporter_ExportDockerArtifacts_Call
ExportDockerArtifacts is a helper method to define mock.On call
func (*MockExporter_Expecter) ExportImages ¶
func (_e *MockExporter_Expecter) ExportImages(ctx interface{}, registry interface{}, imagePrefix interface{}) *MockExporter_ExportImages_Call
ExportImages is a helper method to define mock.On call
- ctx
- registry
- imagePrefix
func (*MockExporter_Expecter) ExportKubernetesArtifacts ¶
func (_e *MockExporter_Expecter) ExportKubernetesArtifacts(registry interface{}, image interface{}, namespace interface{}, pullSecret interface{}, hostname interface{}, ingressClass interface{}) *MockExporter_ExportKubernetesArtifacts_Call
ExportKubernetesArtifacts is a helper method to define mock.On call
- registry
- image
- namespace
- pullSecret
- hostname
- ingressClass
func (*MockExporter_Expecter) ReadYmlFile ¶
func (_e *MockExporter_Expecter) ReadYmlFile(path interface{}) *MockExporter_ReadYmlFile_Call
ReadYmlFile is a helper method to define mock.On call
- path
type MockExporter_ExportDockerArtifacts_Call ¶
MockExporter_ExportDockerArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportDockerArtifacts'
func (*MockExporter_ExportDockerArtifacts_Call) Return ¶
func (_c *MockExporter_ExportDockerArtifacts_Call) Return(err error) *MockExporter_ExportDockerArtifacts_Call
func (*MockExporter_ExportDockerArtifacts_Call) Run ¶
func (_c *MockExporter_ExportDockerArtifacts_Call) Run(run func()) *MockExporter_ExportDockerArtifacts_Call
func (*MockExporter_ExportDockerArtifacts_Call) RunAndReturn ¶
func (_c *MockExporter_ExportDockerArtifacts_Call) RunAndReturn(run func() error) *MockExporter_ExportDockerArtifacts_Call
type MockExporter_ExportImages_Call ¶
MockExporter_ExportImages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportImages'
func (*MockExporter_ExportImages_Call) Return ¶
func (_c *MockExporter_ExportImages_Call) Return(err error) *MockExporter_ExportImages_Call
func (*MockExporter_ExportImages_Call) Run ¶
func (_c *MockExporter_ExportImages_Call) Run(run func(ctx context.Context, registry string, imagePrefix string)) *MockExporter_ExportImages_Call
func (*MockExporter_ExportImages_Call) RunAndReturn ¶
func (_c *MockExporter_ExportImages_Call) RunAndReturn(run func(ctx context.Context, registry string, imagePrefix string) error) *MockExporter_ExportImages_Call
type MockExporter_ExportKubernetesArtifacts_Call ¶
MockExporter_ExportKubernetesArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportKubernetesArtifacts'
func (*MockExporter_ExportKubernetesArtifacts_Call) Return ¶
func (_c *MockExporter_ExportKubernetesArtifacts_Call) Return(err error) *MockExporter_ExportKubernetesArtifacts_Call
func (*MockExporter_ExportKubernetesArtifacts_Call) Run ¶
func (_c *MockExporter_ExportKubernetesArtifacts_Call) Run(run func(registry string, image string, namespace string, pullSecret string, hostname string, ingressClass string)) *MockExporter_ExportKubernetesArtifacts_Call
func (*MockExporter_ExportKubernetesArtifacts_Call) RunAndReturn ¶
func (_c *MockExporter_ExportKubernetesArtifacts_Call) RunAndReturn(run func(registry string, image string, namespace string, pullSecret string, hostname string, ingressClass string) error) *MockExporter_ExportKubernetesArtifacts_Call
type MockExporter_ReadYmlFile_Call ¶
MockExporter_ReadYmlFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadYmlFile'
func (*MockExporter_ReadYmlFile_Call) Return ¶
func (_c *MockExporter_ReadYmlFile_Call) Return(ciYml *ci.CiYml, err error) *MockExporter_ReadYmlFile_Call
func (*MockExporter_ReadYmlFile_Call) Run ¶
func (_c *MockExporter_ReadYmlFile_Call) Run(run func(path string)) *MockExporter_ReadYmlFile_Call
func (*MockExporter_ReadYmlFile_Call) RunAndReturn ¶
func (_c *MockExporter_ReadYmlFile_Call) RunAndReturn(run func(path string) (*ci.CiYml, error)) *MockExporter_ReadYmlFile_Call