Skip to content

Commit

Permalink
Merge pull request #10323 from fejta/build
Browse files Browse the repository at this point in the history
Add build controller, build at each commit
  • Loading branch information
k8s-ci-robot authored Dec 4, 2018
2 parents cba9990 + 95c181d commit bb77caa
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
1 change: 1 addition & 0 deletions prow/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ container_bundle(
images = tags(
"artifact-uploader",
"branchprotector",
"build",
"clonerefs",
"deck",
"entrypoint",
Expand Down
2 changes: 2 additions & 0 deletions prow/cluster/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ load("//prow:def.bzl", "release", "component", "MULTI_KIND", "BUILD_CLUSTER")
release(
"production",
component("branchprotector", "cronjob"),
component("build", "deployment"),
component("build_rbac", MULTI_KIND),
component("deck", "service", "deployment"),
component("gce-ssd-retain", "storageclass"),
component("ghproxy", "service", "deployment"),
Expand Down
21 changes: 21 additions & 0 deletions prow/cluster/build_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: prow-build
namespace: default
spec:
replicas: 1
strategy:
type: Recreate # replace, do not scale up
selector:
matchLabels:
app: prow-build
template:
metadata:
labels:
app: prow-build
spec:
serviceAccount: prow-build # build_rbac.yaml
containers:
- name: build
image: gcr.io/k8s-prow/build:v20181204-b6b53d02b
47 changes: 47 additions & 0 deletions prow/cluster/build_rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: prow-build
namespace: default
---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: prow-build
rules:
- apiGroups:
- build.knative.dev
resources:
- builds
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- prow.k8s.io
resources:
- prowjobs
- prowjobs/status
verbs:
- get
- list
- watch
- update

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: prow-build
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prow-build
subjects:
- kind: ServiceAccount
name: prow-build
namespace: default
1 change: 0 additions & 1 deletion prow/cmd/build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ k8s_object(

prow_image(
name = "image",
base = "@alpine-base//image",
visibility = ["//visibility:public"],
)

Expand Down

0 comments on commit bb77caa

Please sign in to comment.