| load( |
| "@io_bazel_rules_docker//container:container.bzl", |
| "container_image", |
| "container_push", |
| ) |
| load("@debs//file:packages.bzl", "packages") |
| load("//:debs.bzl", "get_dep_list") |
| |
| # build container using kunit.sh and latest kunitconfig from gerrit |
| container_image( |
| name = "kunit", |
| base = "@debian_base//image", |
| debs = [packages[x] for x in get_dep_list()], |
| directory = "/", |
| entrypoint = "/kunit.sh", |
| files = [ |
| "kunit.sh", |
| "@kunitconfig_repo//:kunitconfig", |
| ], |
| mode = "777", |
| repository = "kunit-presubmit/kunit", |
| ) |
| |
| container_push( |
| name = "push_kunit", |
| format = "Docker", |
| image = ":kunit", |
| registry = "gcr.io", |
| repository = "kunit-presubmit/kunit", |
| tag = "latest", |
| ) |
| |
| # build test container using latest kunit source |
| container_image( |
| name = "kunit_test", |
| base = ":kunit", |
| directory = "/kunit/linux", |
| env = {"ARTIFACTS": "kunit/artifacts"}, |
| repository = "kunit-presubmit/test", |
| tars = ["@kunit_repo//:files"], |
| workdir = "/kunit/linux", |
| ) |