func NewBuilder(clientset *client.ConfigSet, s *Service) Builder {
	if !file.IsLocal(s.Source) && !file.IsGit(s.Source) {
		clientset.Log.Debugf("source %q is not local file nor git URL\n", s.Source)
		return nil
	}
	if task.Exist(clientset, s.Runtime) ||
		clustertask.Exist(clientset, s.Runtime) {
		return s.taskRun()
	}
	if file.IsRemote(s.Runtime) {
		clientset.Log.Debugf("runtime %q is seemed to be a remote file, downloading", s.Runtime)
		if localFile, err := file.Download(s.Runtime); err != nil {
			clientset.Log.Warnf("Warning! Cannot fetch runtime: %s\n", err)
		} else {
			s.Runtime = localFile
		}
	}
	return s.taskRun()
}
NewBuilder checks Service build method (tekton task)
and returns corresponding builder interface
package service
import (
	"github.com/triggermesh/tm/pkg/client"
	"github.com/triggermesh/tm/pkg/file"
	"github.com/triggermesh/tm/pkg/resources/clustertask"
	"github.com/triggermesh/tm/pkg/resources/task"
	"github.com/triggermesh/tm/pkg/resources/taskrun"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type Builder interface {
	Deploy(clientset *client.ConfigSet) (string, error)
	SetOwner(clientset *client.ConfigSet, owner metav1.OwnerReference) error
	Delete(clientset *client.ConfigSet) error
}