blob: f0c47f7f0e5092761f897b2589a186e55240b3ac [file] [log] [blame]
Sergiusz Bazanski65865332019-05-18 16:23:45 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image")
2
3container_image(
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +02004 name="0.16.51-1",
Sergiusz Bazanski65865332019-05-18 16:23:45 +02005 base="@prodimage-bionic//image",
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +02006 tars = ["@factorio-headless-0.16.51//file"],
7 files = [":entrypoint.sh"],
8 directory = "/",
9 entrypoint = ["/entrypoint.sh"],
10)
11
12container_image(
13 name="0.17.41-1",
14 base="@prodimage-bionic//image",
15 tars = ["@factorio-headless-0.17.41//file"],
16 files = [":entrypoint.sh"],
17 directory = "/",
18 entrypoint = ["/entrypoint.sh"],
Sergiusz Bazanski65865332019-05-18 16:23:45 +020019)
20
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020021container_image(
22 name="0.17.52-1",
23 base="@prodimage-bionic//image",
24 tars = ["@factorio-headless-0.17.52//file"],
25 files = [":entrypoint.sh"],
26 directory = "/",
27 entrypoint = ["/entrypoint.sh"],
28)
29
Sergiusz Bazanski65865332019-05-18 16:23:45 +020030# Totally broken right now because google/containerregistry doesn't handle
31# /usr/bin/env python == python3.
32#container_push(
33# name = "push_latest",
34# image = ":latest",
35# format = "Docker",
36# registry = "registry.k0.hswaw.net",
37# repository = "app/factorio",
38# tag = "latest",
39#)
40# So this is a replacement hack.
41genrule(
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020042 name = "push_latest",
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020043 srcs = [":0.17.52-1"],
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020044 outs = ["version.sh"],
45 executable = True,
46 cmd = """
Sergiusz Bazanskic2924102019-06-30 17:35:57 +020047 tag=0.17.52-1
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020048 docker tag bazel/app/factorio:$$tag registry.k0.hswaw.net/app/factorio:$$tag
49 docker push registry.k0.hswaw.net/app/factorio:$$tag
50 echo -ne "#!/bin/sh\necho Pushed $$tag.\n" > $(OUTS)
51 """,
Sergiusz Bazanski65865332019-05-18 16:23:45 +020052)