blob: 9e59dfb9743762afa2394adc7a5569b5b287382e [file] [log] [blame]
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
Bartosz Stebelcae27ec2020-07-03 07:05:15 +02002load("@pydeps//:requirements.bzl", "requirement")
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02003
Serge Bazanski97b5cd72023-07-28 17:14:50 +00004py_binary(
Serge Bazanski821fa5f2019-08-14 14:33:30 +02005 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 ],
Serge Bazanski97b5cd72023-07-28 17:14:50 +00009 legacy_create_init = False,
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020010 deps = [
Bartosz Stebelcae27ec2020-07-03 07:05:15 +020011 requirement("requests"),
Bartosz Stebelcae27ec2020-07-03 07:05:15 +020012 "//bgpwtf/cccampix/proto:ix_grpc_proto",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000013 "//bgpwtf/cccampix/proto:ix_py_proto",
Sergiusz Bazanski57be3f72019-07-19 20:58:50 +020014 ],
15)
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020016
17container_layer(
18 name = "layer_bin",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020019 directory = "/ix/",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000020 files = [
21 "//bgpwtf/cccampix:ripe-sync",
22 "//bgpwtf/cccampix/frontend",
23 "//bgpwtf/cccampix/irr",
24 "//bgpwtf/cccampix/peeringdb",
25 "//bgpwtf/cccampix/pgpencryptor",
26 "//bgpwtf/cccampix/verifier",
27 ],
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020028)
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",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020042 format = "Docker",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000043 image = ":runtime",
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +020044 registry = "registry.k0.hswaw.net",
45 repository = "bgpwtf/cccampix",
46 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
47)