blob: f03d7260cbf054f0f9817aacd1fb14c8cb0c3c22 [file] [log] [blame] [edit]
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "periodictasks_lib",
srcs = ["periodictasks.go"],
importpath = "go.skia.org/infra/golden/cmd/periodictasks",
visibility = ["//visibility:private"],
deps = [
"//go/auth",
"//go/common",
"//go/gcs",
"//go/gcs/gcsclient",
"//go/gerrit",
"//go/httputils",
"//go/metrics2",
"//go/now",
"//go/skerr",
"//go/sklog",
"//go/sql/sqlutil",
"//go/util",
"//golden/go/code_review",
"//golden/go/code_review/commenter",
"//golden/go/code_review/gerrit_crs",
"//golden/go/code_review/github_crs",
"//golden/go/config",
"//golden/go/ignore/sqlignorestore",
"//golden/go/sql",
"//golden/go/sql/schema",
"//golden/go/storage",
"//golden/go/tracing",
"//golden/go/types",
"//perf/go/ingest/format",
"@com_github_cockroachdb_cockroach_go_v2//crdb/crdbpgx",
"@com_github_jackc_pgtype//:pgtype",
"@com_github_jackc_pgx_v4//:pgx",
"@com_github_jackc_pgx_v4//pgxpool",
"@com_google_cloud_go_storage//:storage",
"@io_opencensus_go//trace",
"@org_golang_x_oauth2//:oauth2",
"@org_golang_x_oauth2//google",
],
)
go_binary(
name = "periodictasks",
embed = [":periodictasks_lib"],
visibility = ["//visibility:public"],
)
go_test(
name = "periodictasks_test",
srcs = ["periodictasks_test.go"],
data = ["//golden/k8s-instances:periodictasks_configs"],
embed = [":periodictasks_lib"],
deps = [
"//go/gcs",
"//go/gcs/mocks",
"//go/now",
"//go/testutils",
"//golden/go/config/validation",
"//golden/go/sql/datakitchensink",
"//golden/go/sql/schema",
"//golden/go/sql/sqltest",
"//golden/go/types",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//mock",
"@com_github_stretchr_testify//require",
],
)