Skip to content

Commit

Permalink
Add a new controller which creates a Tekton PipelineRun from a prow job
Browse files Browse the repository at this point in the history
  • Loading branch information
ccojocar committed Apr 16, 2019
1 parent c829a46 commit 619cd5c
Show file tree
Hide file tree
Showing 7 changed files with 2,225 additions and 1 deletion.
92 changes: 92 additions & 0 deletions prow/cmd/pipeline/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("//prow:def.bzl", "prow_image")

prow_image(
name = "image",
visibility = ["//visibility:public"],
)

go_library(
name = "go_default_library",
srcs = [
"controller.go",
"main.go",
],
importpath = "k8s.io/test-infra/prow/cmd/pipeline",
visibility = ["//visibility:private"],
deps = [
"//prow/apis/prowjobs/v1:go_default_library",
"//prow/client/clientset/versioned:go_default_library",
"//prow/client/clientset/versioned/scheme:go_default_library",
"//prow/client/informers/externalversions:go_default_library",
"//prow/client/informers/externalversions/prowjobs/v1:go_default_library",
"//prow/client/listers/prowjobs/v1:go_default_library",
"//prow/config:go_default_library",
"//prow/kube:go_default_library",
"//prow/logrusutil:go_default_library",
"//prow/pjutil:go_default_library",
"//prow/pod-utils/decorate:go_default_library",
"//vendor/github.com/knative/pkg/apis/duck/v1alpha1:go_default_library",
"//vendor/github.com/sirupsen/logrus:go_default_library",
"//vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1:go_default_library",
"//vendor/github.com/tektoncd/pipeline/pkg/client/clientset/versioned:go_default_library",
"//vendor/github.com/tektoncd/pipeline/pkg/client/informers/externalversions:go_default_library",
"//vendor/github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1alpha1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
"//vendor/k8s.io/client-go/tools/record:go_default_library",
"//vendor/k8s.io/client-go/util/workqueue:go_default_library",
],
)

go_binary(
name = "pipeline",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)

go_test(
name = "go_default_test",
srcs = [
"controller_test.go",
"main_test.go",
],
embed = [":go_default_library"],
deps = [
"//prow/apis/prowjobs/v1:go_default_library",
"//prow/kube:go_default_library",
"//prow/pod-utils/decorate:go_default_library",
"//vendor/github.com/knative/pkg/apis/duck/v1alpha1:go_default_library",
"//vendor/github.com/sirupsen/logrus:go_default_library",
"//vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
Loading

0 comments on commit 619cd5c

Please sign in to comment.