blob: db123759fde0469332a6db85af50e14f8ad858ce [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",
Serge Bazanski915b2652019-08-14 18:50:10 +020023 "//bgpwtf/cccampix/pgpencryptor:pgpencryptor",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020024 "//bgpwtf/cccampix/peeringdb:peeringdb",
25 "//bgpwtf/cccampix/verifier:verifier",
26 "//bgpwtf/cccampix/frontend:frontend.par",
27 ],
28 directory = "/ix/",
29)
30
31container_image(
32 name = "runtime",
33 base = "@prodimage-bionic//image",
34 layers = [
35 ":layer_bin",
36 "//bgpwtf/cccampix/octorpki:layer_bin",
37 "//bgpwtf/cccampix/octorpki:layer_tals",
38 ],
39)
40
41container_push(
42 name = "push",
43 image = ":runtime",
44 format = "Docker",
45 registry = "registry.k0.hswaw.net",
46 repository = "bgpwtf/cccampix",
47 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
48)