blob: 291590aa3f0e710e5b9172f512561188a8b96647 [file] [log] [blame]
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
Serge Bazanski821fa5f2019-08-14 14:33:30 +02002load("@subpar//:subpar.bzl", "par_binary")
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02003
Serge Bazanski821fa5f2019-08-14 14:33:30 +02004par_binary(
5 name = "ripe-sync",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +02006 srcs = [
Serge Bazanski821fa5f2019-08-14 14:33:30 +02007 "ripe-sync.py",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +02008 ],
9 deps = [
Serge Bazanski821fa5f2019-08-14 14:33:30 +020010 "@pip36//grpcio",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020011 "@pip36//requests",
Serge Bazanski821fa5f2019-08-14 14:33:30 +020012 "//bgpwtf/cccampix/proto:ix_py_proto",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020013 ],
Serge Bazanski821fa5f2019-08-14 14:33:30 +020014 legacy_create_init = False,
15 zip_safe = False,
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020016)
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020017
18container_layer(
19 name = "layer_bin",
20 files = [
Serge Bazanski821fa5f2019-08-14 14:33:30 +020021 "//bgpwtf/cccampix:ripe-sync.par",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020022 "//bgpwtf/cccampix/irr:irr",
23 "//bgpwtf/cccampix/peeringdb:peeringdb",
24 "//bgpwtf/cccampix/verifier:verifier",
25 "//bgpwtf/cccampix/frontend:frontend.par",
26 ],
27 directory = "/ix/",
28)
29
30container_image(
31 name = "runtime",
32 base = "@prodimage-bionic//image",
33 layers = [
34 ":layer_bin",
35 "//bgpwtf/cccampix/octorpki:layer_bin",
36 "//bgpwtf/cccampix/octorpki:layer_tals",
37 ],
38)
39
40container_push(
41 name = "push",
42 image = ":runtime",
43 format = "Docker",
44 registry = "registry.k0.hswaw.net",
45 repository = "bgpwtf/cccampix",
46 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
47)