develop

Conflicts:
	gmod/initConfig.sh
This commit is contained in:
Lucas Briese 2020-10-12 22:39:42 +02:00
commit 72fd78fce3
5 changed files with 35 additions and 20 deletions

View File

@ -1,4 +1,6 @@
FROM jusito/docker-ttt:gmod_debian ARG SUFFIX=""
FROM jusito/docker-ttt:gmod_debian${SUFFIX}
ENV SERVER_GAMEMODE="terrortown" ENV SERVER_GAMEMODE="terrortown"

View File

@ -1,4 +1,6 @@
FROM jusito/docker-ttt:lgsm_debian ARG SUFFIX=""
FROM jusito/docker-ttt:lgsm_debian${SUFFIX}
# Const \\ Overwrite Env \\ Configs optional # Const \\ Overwrite Env \\ Configs optional
ENV CSS_PATH="/home/steam/addons/css" \ ENV CSS_PATH="/home/steam/addons/css" \

View File

@ -19,11 +19,12 @@ function configReplace() {
echo "[initConfig.sh]Request for replacing $source to $target, source is found $count times" echo "[initConfig.sh]Request for replacing $source to $target, source is found $count times"
if [ "$count" == "1" ]; then if [ "$count" == "1" ]; then
sed -Ei "s/${source}.*/${source} ${target}/g" "${CFG_PATH}" sed -Ei "/${source}.*/d" "${CFG_PATH}"
echo "$source $target" >> "${CFG_PATH}"
elif [ "$count" == "0" ]; then elif [ "$count" == "0" ]; then
echo "" >> "${CFG_PATH}" echo "" >> "${CFG_PATH}"
echo "$target" >> "${CFG_PATH}" echo "$source $target" >> "${CFG_PATH}"
else else
echo "[initConfig.sh]can't set $1 because there are multiple in" echo "[initConfig.sh]can't set $1 because there are multiple in"

View File

@ -1,17 +1,19 @@
#!/bin/sh #!/bin/sh
#set -o errexit set -o errexit
#set -o pipefail #set -o pipefail
#set -o nounset set -o nounset
#docker build -t "$DOCKER_REPO:lgsm_debian" "lgsm/" imageSuffix=""
if [ "$SOURCE_BRANCH" != "master" ]; then
imageSuffix="-$(echo "$SOURCE_BRANCH" | sed 's/\//-/g')"
fi
#docker build -t "$DOCKER_REPO:lgsm_debian${imageSuffix}" "lgsm/"
cd .. cd ..
docker build -t "$DOCKER_REPO:gmod_debian" "gmod/"
docker build -t "$DOCKER_REPO:gmod_ttt_debian" "TTT/"
docker tag "$DOCKER_REPO:gmod_ttt_debian" "$DOCKER_REPO:latest"
docker push "$DOCKER_REPO:gmod_debian"
docker push "$DOCKER_REPO:gmod_ttt_debian"
docker push "$DOCKER_REPO:latest"
bash test/testBuild.sh "$imageSuffix" true
docker push "$DOCKER_REPO:gmod_debian${imageSuffix}"
docker push "$DOCKER_REPO:gmod_ttt_debian${imageSuffix}"
docker push "$DOCKER_REPO:latest${imageSuffix}"

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
readonly SUFFIX="$1"
readonly SKIP_LGSM="$2"
if [ "${DEBUGGING}" = "true" ]; then if [ "${DEBUGGING}" = "true" ]; then
set -o xtrace set -o xtrace
else else
@ -12,11 +15,16 @@ set -o pipefail
echo "[testBuild][INFO]build" echo "[testBuild][INFO]build"
docker rmi "jusito/docker-ttt:lgsm_debian" || true if [ "$SKIP_LGSM" = true ]; then
docker build --no-cache -t "jusito/docker-ttt:lgsm_debian" "lgsm/" docker rmi "jusito/docker-ttt:lgsm_debian${SUFFIX}" || true
docker build --no-cache -t "jusito/docker-ttt:lgsm_debian${SUFFIX}" "lgsm/"
fi
docker rmi "jusito/docker-ttt:gmod_debian" || true docker rmi "jusito/docker-ttt:gmod_debian${SUFFIX}" || true
docker build --no-cache -t "jusito/docker-ttt:gmod_debian" "gmod/" docker build --no-cache -t "jusito/docker-ttt:gmod_debian${SUFFIX}" "gmod/"
docker rmi "jusito/docker-ttt:gmod_ttt_debian" || true docker rmi "jusito/docker-ttt:gmod_ttt_debian${SUFFIX}" || true
docker build --no-cache -t "jusito/docker-ttt:gmod_ttt_debian" "TTT/" docker build --no-cache -t "jusito/docker-ttt:gmod_ttt_debian${SUFFIX}" "TTT/"
docker rmi "$DOCKER_REPO:latest${SUFFIX}" || true
docker tag "$DOCKER_REPO:gmod_ttt_debian${SUFFIX}" "$DOCKER_REPO:latest${SUFFIX}"