Skip to content

Commit

Permalink
Import KETTLE, a pipeline to get GCS test results into BigQuery.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Hitchman committed Mar 7, 2017
1 parent 0f7a1e4 commit a57d0bd
Show file tree
Hide file tree
Showing 10 changed files with 1,146 additions and 2 deletions.
18 changes: 16 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ go_prefix("k8s.io/test-infra")

filegroup(
name = "package-srcs",
srcs = glob(["**"], exclude=["bazel-*/**", ".git/**"]),
tags = ["automanaged"],
srcs = glob(
["**"],
exclude = [
"bazel-*/**",
".git/**",
"*.db",
"*.gz",
],
),
visibility = ["//visibility:private"],
)

filegroup(
name = "buckets",
srcs = ["buckets.yaml"],
visibility = ["//:__subpackages__"],
)

filegroup(
name = "all-srcs",
srcs = [
Expand All @@ -18,6 +31,7 @@ filegroup(
"//images/pull_kubernetes_bazel:all-srcs",
"//jenkins:all-srcs",
"//jobs:all-srcs",
"//kettle:all-srcs",
"//kubetest:all-srcs",
"//mungegithub:all-srcs",
"//prow:all-srcs",
Expand Down
3 changes: 3 additions & 0 deletions kettle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.db
*.gz
*.json
59 changes: 59 additions & 0 deletions kettle/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
py_test(
name = "make_db_test",
srcs = [
"make_db.py",
"make_db_test.py",
"model.py",
],
# Remove when these are fixed.
# https://github.com/bazelbuild/bazel/issues/1973
# https://github.com/bazelbuild/bazel/issues/2056
local = True,
)

py_binary(
name = "make_db",
srcs = [
"make_db.py",
"model.py",
],
)

py_test(
name = "model_test",
srcs = [
"model.py",
"model_test.py",
],
)

py_test(
name = "make_json_test",
srcs = [
"make_json.py",
"make_json_test.py",
"model.py",
],
data = ["//:buckets"],
# idem
local = True,
)

filegroup(
name = "package-srcs",
srcs = glob(
["**"],
exclude = [
"*.db",
"*.gz",
],
),
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
6 changes: 6 additions & 0 deletions kettle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
KETTLE -- Kubernetes Extract Tests/Transform/Load Engine
======

This collects test results scattered across a variety of GCS buckets,
stores them in a local SQLite database, and outputs newline-delimited JSON files
for import into BigQuery.
Loading

0 comments on commit a57d0bd

Please sign in to comment.