Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (ci): Fix testing image to work correctly for srcds/csgo #165

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ else
DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-${REGISTRY_SOURCE:?err}/$GAME}"
GAME_ENGINE='srcds'
# srcds/cs2
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
GAME_BIN='game/bin/linuxsteamrt64/cs2'
else
GAME_BIN='srcds_linux'
Expand Down Expand Up @@ -276,7 +276,7 @@ if [ ! "$NO_TEST" = 'true' ]; then
time docker run -t --rm "$GAME_IMAGE" 'printenv && ls -al'
date
# srcds/cs2
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
CONTAINER_ID=$( docker run -td "$GAME_IMAGE" "$GAME_BIN -dedicated -port 27015 +map de_dust2" )
i=0; while [ "$i" -lt 30 ]; do
echo "Waiting for server to start"
Expand All @@ -295,7 +295,7 @@ if [ ! "$NO_TEST" = 'true' ]; then
# Verify game version of the game image matches the value of GAME_VERSION
echo 'Verifying game image game version'
GAME_IMAGE_VERSION_LINES=$(
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
cat "$TEST_DIR/test" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
else
cat "$TEST_DIR/test" | grep -iE '\bexe\b|version'
Expand Down