diff --git a/cmd/root.go b/cmd/root.go index ec1e2e680f..b246d73b26 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -122,7 +122,6 @@ Learn more about Knative at: https://knative.dev`, cfg.Name), Commands: []*cobra.Command{ NewCompletionCmd(), NewVersionCmd(cfg.Version), - NewTektonClusterTasksCmd(), NewMCPCmd(newClient), }, }, diff --git a/cmd/tkn_tasks.go b/cmd/tkn_tasks.go deleted file mode 100644 index 57b7dd793f..0000000000 --- a/cmd/tkn_tasks.go +++ /dev/null @@ -1,27 +0,0 @@ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" - - "knative.dev/func/pkg/pipelines/tekton" -) - -func NewTektonClusterTasksCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "tkn-tasks", - Short: "List tekton cluster tasks as multi-document yaml", - Long: `This command prints tekton tekton task embed in the func binary. -Some advanced functionality like OpenShift's Web Console build my require installation of these tasks. -Installation: func tkn-tasks | kubectl apply -f - -`, - Hidden: true, - RunE: func(cmd *cobra.Command, args []string) error { - _, err := fmt.Fprintln(cmd.OutOrStdout(), tekton.GetClusterTasks()) - return err - }, - } - - return cmd -} diff --git a/pkg/pipelines/tekton/tasks.go b/pkg/pipelines/tekton/tasks.go index 04faf8456d..0c962c3980 100644 --- a/pkg/pipelines/tekton/tasks.go +++ b/pkg/pipelines/tekton/tasks.go @@ -3,7 +3,6 @@ package tekton import ( "bytes" _ "embed" - "strings" "text/template" ) @@ -38,14 +37,6 @@ func getS2ITask() string { return getTask(s2iTaskTemplate) } -// GetClusterTasks returns multi-document yaml containing tekton tasks used by func. -func GetClusterTasks() string { - tasks := getBuildpackTask() + "\n---\n" + getS2ITask() - tasks = strings.ReplaceAll(tasks, "kind: Task", "kind: ClusterTask") - tasks = strings.ReplaceAll(tasks, "apiVersion: tekton.dev/v1", "apiVersion: tekton.dev/v1beta1") - return tasks -} - func getTask(t string) string { tmpl, err := template.New("").Parse(t) if err != nil {