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") |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 2 | load("@subpar//:subpar.bzl", "par_binary") |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 3 | load("@pydeps//:requirements.bzl", "requirement") |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 4 | |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 5 | par_binary( |
| 6 | name = "ripe-sync", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 7 | srcs = [ |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 8 | "ripe-sync.py", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 9 | ], |
| 10 | deps = [ |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 11 | requirement("requests"), |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 12 | "//bgpwtf/cccampix/proto:ix_py_proto", |
Bartosz Stebel | cae27ec | 2020-07-03 07:05:15 +0200 | [diff] [blame] | 13 | "//bgpwtf/cccampix/proto:ix_grpc_proto", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 14 | ], |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 15 | legacy_create_init = False, |
| 16 | zip_safe = False, |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 17 | ) |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 18 | |
| 19 | container_layer( |
| 20 | name = "layer_bin", |
| 21 | files = [ |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 22 | "//bgpwtf/cccampix:ripe-sync.par", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 23 | "//bgpwtf/cccampix/irr:irr", |
Serge Bazanski | 915b265 | 2019-08-14 18:50:10 +0200 | [diff] [blame] | 24 | "//bgpwtf/cccampix/pgpencryptor:pgpencryptor", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 25 | "//bgpwtf/cccampix/peeringdb:peeringdb", |
| 26 | "//bgpwtf/cccampix/verifier:verifier", |
| 27 | "//bgpwtf/cccampix/frontend:frontend.par", |
| 28 | ], |
| 29 | directory = "/ix/", |
| 30 | ) |
| 31 | |
| 32 | container_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 | |
| 42 | container_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 | ) |