This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
build-containers/deprecated/build-satasfactory.jenkins
2022-07-04 11:19:30 -05:00

48 lines
1.3 KiB
Plaintext

def repository = "registry.c.test-chamber-13.lan"
def repositoryCreds = "harbor-repository-creds"
def dockerFile = """
FROM ${repository}/dockerhub/cm2network/steamcmd:latest
LABEL maintainer="The_Spider <spider@smoothnet.org>"
EXPOSE 15777/udp
EXPOSE 15000/udp
EXPOSE 777/udp
RUN /home/steam/steamcmd/steamcmd.sh +quit && \\
/home/steam/steamcmd/steamcmd.sh +force_install_dir /home/steam/SatisfactoryDedicatedServer +login anonymous +app_update 1690800 validate +quit
WORKDIR /home/steam/SatisfactoryDedicatedServer
ENTRYPOINT ["/bin/bash" "-c" "./FactoryServer.sh -multihome=0.0.0.0"]
"""
def label = "kubernetes-${UUID.randomUUID().toString()}"
def templateName = "pipeline-worker"
podTemplate (
label: label,
name: templateName,
yaml: functions.podYaml(
repo: repository,
templateName: templateName,
kaniko: true,
alpine: true
)
){
node (label) {
functions.buildContainer(
repository: repository,
imageDest: "${repository}/library/statafactory-server:latest",
dockerFile: dockerFile,
repoCreds: repositoryCreds,
)
functions.deletePod(
kubeAuth: "rancher-admin-token",
kubeURL: "https://k8s.test-chamber-13.lan:8043",
namespace: "game-servers",
selector: "app=satasfactory"
)
}
}