forked from hswaw/hscloud
53 lines
1.4 KiB
Python
53 lines
1.4 KiB
Python
|
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
|
||
|
|
||
|
container_image(
|
||
|
name="0.16.51-1",
|
||
|
base="@prodimage-bionic//image",
|
||
|
tars = ["@factorio-headless-0.16.51//file"],
|
||
|
files = [":entrypoint.sh"],
|
||
|
directory = "/",
|
||
|
entrypoint = ["/entrypoint.sh"],
|
||
|
)
|
||
|
|
||
|
container_image(
|
||
|
name="0.17.41-1",
|
||
|
base="@prodimage-bionic//image",
|
||
|
tars = ["@factorio-headless-0.17.41//file"],
|
||
|
files = [":entrypoint.sh"],
|
||
|
directory = "/",
|
||
|
entrypoint = ["/entrypoint.sh"],
|
||
|
)
|
||
|
|
||
|
container_image(
|
||
|
name="0.17.52-1",
|
||
|
base="@prodimage-bionic//image",
|
||
|
tars = ["@factorio-headless-0.17.52//file"],
|
||
|
files = [":entrypoint.sh"],
|
||
|
directory = "/",
|
||
|
entrypoint = ["/entrypoint.sh"],
|
||
|
)
|
||
|
|
||
|
# Totally broken right now because google/containerregistry doesn't handle
|
||
|
# /usr/bin/env python == python3.
|
||
|
#container_push(
|
||
|
# name = "push_latest",
|
||
|
# image = ":latest",
|
||
|
# format = "Docker",
|
||
|
# registry = "registry.k0.hswaw.net",
|
||
|
# repository = "app/factorio",
|
||
|
# tag = "latest",
|
||
|
#)
|
||
|
# So this is a replacement hack.
|
||
|
genrule(
|
||
|
name = "push_latest",
|
||
|
srcs = [":0.17.52-1"],
|
||
|
outs = ["version.sh"],
|
||
|
executable = True,
|
||
|
cmd = """
|
||
|
tag=0.17.52-1
|
||
|
docker tag bazel/personal/q3k/factorio:$$tag registry.k0.hswaw.net/personal/q3k/factorio:$$tag
|
||
|
docker push registry.k0.hswaw.net/personal/q3k/factorio:$$tag
|
||
|
echo -ne "#!/bin/sh\necho Pushed $$tag.\n" > $(OUTS)
|
||
|
""",
|
||
|
)
|