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") |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 3 | |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 4 | par_binary( |
| 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 | ], |
| 9 | deps = [ |
Sergiusz Bazanski | 5f9b1ec | 2019-09-22 02:19:18 +0200 | [diff] [blame] | 10 | "@pydeps//grpcio", |
| 11 | "@pydeps//requests", |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 12 | "//bgpwtf/cccampix/proto:ix_py_proto", |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 13 | ], |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 14 | legacy_create_init = False, |
| 15 | zip_safe = False, |
Sergiusz Bazanski | 57be3f7 | 2019-07-19 20:58:50 +0200 | [diff] [blame] | 16 | ) |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 17 | |
| 18 | container_layer( |
| 19 | name = "layer_bin", |
| 20 | files = [ |
Serge Bazanski | 821fa5f | 2019-08-14 14:33:30 +0200 | [diff] [blame] | 21 | "//bgpwtf/cccampix:ripe-sync.par", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 22 | "//bgpwtf/cccampix/irr:irr", |
Serge Bazanski | 915b265 | 2019-08-14 18:50:10 +0200 | [diff] [blame] | 23 | "//bgpwtf/cccampix/pgpencryptor:pgpencryptor", |
Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 24 | "//bgpwtf/cccampix/peeringdb:peeringdb", |
| 25 | "//bgpwtf/cccampix/verifier:verifier", |
| 26 | "//bgpwtf/cccampix/frontend:frontend.par", |
| 27 | ], |
| 28 | directory = "/ix/", |
| 29 | ) |
| 30 | |
| 31 | container_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 | |
| 41 | container_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 | ) |