blob: 205289fdbef0007bcc5f62d1203c05cdf8587b3d [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")
Bartosz Stebelcae27ec2020-07-03 07:05:15 +02003load("@pydeps//:requirements.bzl", "requirement")
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02004
Serge Bazanski821fa5f2019-08-14 14:33:30 +02005par_binary(
6 name = "ripe-sync",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +02007 srcs = [
Serge Bazanski821fa5f2019-08-14 14:33:30 +02008 "ripe-sync.py",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +02009 ],
10 deps = [
Bartosz Stebelcae27ec2020-07-03 07:05:15 +020011 requirement("requests"),
Serge Bazanski821fa5f2019-08-14 14:33:30 +020012 "//bgpwtf/cccampix/proto:ix_py_proto",
Bartosz Stebelcae27ec2020-07-03 07:05:15 +020013 "//bgpwtf/cccampix/proto:ix_grpc_proto",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020014 ],
Serge Bazanski821fa5f2019-08-14 14:33:30 +020015 legacy_create_init = False,
16 zip_safe = False,
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020017)
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020018
19container_layer(
20 name = "layer_bin",
21 files = [
Serge Bazanski821fa5f2019-08-14 14:33:30 +020022 "//bgpwtf/cccampix:ripe-sync.par",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020023 "//bgpwtf/cccampix/irr:irr",
Serge Bazanski915b2652019-08-14 18:50:10 +020024 "//bgpwtf/cccampix/pgpencryptor:pgpencryptor",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020025 "//bgpwtf/cccampix/peeringdb:peeringdb",
26 "//bgpwtf/cccampix/verifier:verifier",
27 "//bgpwtf/cccampix/frontend:frontend.par",
28 ],
29 directory = "/ix/",
30)
31
32container_image(
33 name = "runtime",
34 base = "@prodimage-bionic//image",
35 layers = [
36 ":layer_bin",
37 "//bgpwtf/cccampix/octorpki:layer_bin",
38 "//bgpwtf/cccampix/octorpki:layer_tals",
39 ],
40)
41
42container_push(
43 name = "push",
44 image = ":runtime",
45 format = "Docker",
46 registry = "registry.k0.hswaw.net",
47 repository = "bgpwtf/cccampix",
48 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
49)