Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 2 | load("@pydeps//:requirements.bzl", "requirement") |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 3 | |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 4 | py_binary( |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 5 | name = "ripe-sync", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 6 | srcs = [ |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 7 | "ripe-sync.py", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 8 | ], |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 9 | legacy_create_init = False, |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 10 | deps = [ |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 11 | requirement("requests"), |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 12 | "//bgpwtf/cccampix/proto:ix_grpc_proto", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 13 | "//bgpwtf/cccampix/proto:ix_py_proto", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 14 | ], |
| 15 | ) |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 16 | |
| 17 | container_layer( |
| 18 | name = "layer_bin", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 19 | directory = "/ix/", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 20 | 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 Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 28 | ) |
| 29 | |
| 30 | container_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 | |
| 40 | container_push( |
| 41 | name = "push", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 42 | format = "Docker", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 43 | image = ":runtime", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 44 | registry = "registry.k0.hswaw.net", |
| 45 | repository = "bgpwtf/cccampix", |
| 46 | tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}", |
| 47 | ) |