blob: f3fd1914b7e9d6276323f4a4c5202ddbd861e075 [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
21# Totally broken right now because google/containerregistry doesn't handle
22# /usr/bin/env python == python3.
23#container_push(
24# name = "push_latest",
25# image = ":latest",
26# format = "Docker",
27# registry = "registry.k0.hswaw.net",
28# repository = "app/factorio",
29# tag = "latest",
30#)
31# So this is a replacement hack.
32genrule(
Sergiusz Bazanski644f9ff2019-05-19 03:09:47 +020033 name = "push_latest",
34 srcs = [":0.17.41-1"],
35 outs = ["version.sh"],
36 executable = True,
37 cmd = """
38 tag=0.17.41-1
39 docker tag bazel/app/factorio:$$tag registry.k0.hswaw.net/app/factorio:$$tag
40 docker push registry.k0.hswaw.net/app/factorio:$$tag
41 echo -ne "#!/bin/sh\necho Pushed $$tag.\n" > $(OUTS)
42 """,
Sergiusz Bazanski65865332019-05-18 16:23:45 +020043)