Documentation ¶
Index ¶
- func DetermineBuildExecution(component appstudiov1alpha1.Component, params []tektonapi.Param, ...) tektonapi.PipelineRunSpec
- func Generate(fs afero.Fs, outputFolder string, component appstudiov1alpha1.Component) error
- func GenerateAndPush(outputPath string, remote string, component appstudiov1alpha1.Component, ...) error
- func GenerateBuild(fs afero.Fs, outputFolder string, component appstudiov1alpha1.Component) error
- func GenerateBuildWebhookRoute(component appstudiov1alpha1.Component) routev1.Route
- func GenerateCommonStorage(component appstudiov1alpha1.Component, name string) corev1.PersistentVolumeClaim
- func GenerateEventListener(component appstudiov1alpha1.Component, ...) triggersapi.EventListener
- func GenerateTriggerTemplate(component appstudiov1alpha1.Component) (*triggersapi.TriggerTemplate, error)
- func GetBuildCommonLabelsForComponent(component *appstudiov1alpha1.Component) map[string]string
- func GetParamsForComponentInitialBuild(component appstudiov1alpha1.Component) []tektonapi.Param
- type CmdExecutor
- type Executor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineBuildExecution ¶
func DetermineBuildExecution(component appstudiov1alpha1.Component, params []tektonapi.Param, workspaceSubPath string) tektonapi.PipelineRunSpec
DetermineBuildExecution returns the pipelineRun spec that would be used in webhooks-triggered pipelineRuns as well as user-triggered PipelineRuns
func Generate ¶
Generate takes in a given Component CR and spits out a deployment, service, and route file to disk
func GenerateAndPush ¶
func GenerateAndPush(outputPath string, remote string, component appstudiov1alpha1.Component, e Executor, appFs afero.Fs, branch string, context string) error
GenerateAndPush takes in the flollowing args and generates the gitops resources for a given component 1. outputPath: Where to output the gitops resources to. 2. remote: A string of the form https://$token@github.com/<org>/<repo>. Corresponds to the component's gitops repository 2. component: A component struct corresponding to a single Component in an Application in AS 4. The executor to use to execute the git commands (either gitops.executor or gitops.mockExecutor) 5. The filesystem object used to create (either ioutils.NewFilesystem() or ioutils.NewMemoryFilesystem()) 6. The branch to push to 7. The path within the repository to generate the resources in Adapted from https://github.com/redhat-developer/kam/blob/master/pkg/pipelines/utils.go#L79
func GenerateBuild ¶
func GenerateBuildWebhookRoute ¶
func GenerateBuildWebhookRoute(component appstudiov1alpha1.Component) routev1.Route
GenerateBuildWebhookRoute returns the Route resource that would enable ingress traffic into the webhook endpoint ( aka EventListener) TODO: This needs to be secure.
func GenerateCommonStorage ¶
func GenerateCommonStorage(component appstudiov1alpha1.Component, name string) corev1.PersistentVolumeClaim
GenerateCommonStorage returns the PVC that would be created per namespace for user-triggered and webhook-triggered Tekton workspaces.
func GenerateEventListener ¶
func GenerateEventListener(component appstudiov1alpha1.Component, triggerTemplate triggersapi.TriggerTemplate) triggersapi.EventListener
The GenerateEventListener is responsible for defining how to "parse" the incoming event ( "github-push ") and create the resultant PipelineRun ( defined as a TriggerTemplate ). The reconciler for EventListeners create a Service, which when exposed enables ingress traffic from Github events.
func GenerateTriggerTemplate ¶
func GenerateTriggerTemplate(component appstudiov1alpha1.Component) (*triggersapi.TriggerTemplate, error)
GenerateTriggerTemplate generates the TriggerTemplate resources which defines how a webhook-based trigger event would be handled - In this case, a PipelineRun to build an image would be created.
func GetBuildCommonLabelsForComponent ¶
func GetBuildCommonLabelsForComponent(component *appstudiov1alpha1.Component) map[string]string
func GetParamsForComponentInitialBuild ¶
func GetParamsForComponentInitialBuild(component appstudiov1alpha1.Component) []tektonapi.Param
GetParamsForComponentInitialBuild would return the 'input' parameters for the initial PipelineRun that would build an image from source right after a Component is imported.
Types ¶
type CmdExecutor ¶
type CmdExecutor struct { }
func NewCmdExecutor ¶
func NewCmdExecutor() CmdExecutor
NewCmdExecutor creates and returns an executor implementation that uses exec.Command to execute the commands.