Skip to content

Commit

Permalink
Enhancement (ci): Add NO_CACHE env var (#172)
Browse files Browse the repository at this point in the history
Co-authored-by: joe <[email protected]>
  • Loading branch information
leojonathanoh and joeltimothyoh authored Nov 27, 2023
1 parent 4488fd4 commit fc94fe2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ usage() {
echo " NO_PULL Whether to skip pulling the game image by the :latest image before build. Applies only to PIPELINE=update"
echo " Type: bool, optional"
echo " Possible values: 'true', 'false'"
echo " NO_CACHE Whether to use --no-cache for docker build"
echo " Type: bool, optional"
echo " Possible values: 'true', 'false'"
echo " NO_TEST Whether to skip testing of the successfully built game image"
echo " Type: bool, optional"
echo " Possible values: 'true', 'false'"
Expand Down Expand Up @@ -130,6 +133,7 @@ if [ "$PIPELINE" = 'build' ]; then
INSTALL_COUNT=${INSTALL_COUNT:-}
LATEST=${LATEST:-}
CACHE=${CACHE:-}
NO_CACHE=${NO_CACHE:-false}
NO_TEST=${NO_TEST:-}
NO_PUSH=${NO_PUSH:-}
STEAM_LOGIN=${STEAM_LOGIN:-}
Expand All @@ -140,6 +144,7 @@ elif [ "$PIPELINE" = 'update' ]; then
GAME_UPDATE_COUNT=${GAME_UPDATE_COUNT:?err}
INSTALL_COUNT=${INSTALL_COUNT:-}
NO_PULL=${NO_PULL:-}
NO_CACHE=${NO_CACHE:-false}
NO_TEST=${NO_TEST:-}
NO_PUSH=${NO_PUSH:-}
STEAM_LOGIN=${STEAM_LOGIN:-}
Expand Down Expand Up @@ -227,6 +232,7 @@ if [ "$PIPELINE" = 'build' ]; then
--progress plain \
--secret id=STEAM_USERNAME,env=STEAM_USERNAME \
--secret id=STEAM_PASSWORD,env=STEAM_PASSWORD \
--no-cache="$NO_CACHE" \
--build-arg APPID="$APPID" \
--build-arg MOD="$MOD" \
--build-arg FIX_APPMANIFEST="$FIX_APPMANIFEST" \
Expand Down Expand Up @@ -260,6 +266,7 @@ elif [ "$PIPELINE" = 'update' ]; then
--progress plain \
--secret id=STEAM_USERNAME,env=STEAM_USERNAME \
--secret id=STEAM_PASSWORD,env=STEAM_PASSWORD \
--no-cache="$NO_CACHE" \
--build-arg GAME_IMAGE="$GAME_IMAGE_LATEST" \
--build-arg INSTALL_COUNT="$INSTALL_COUNT" \
--build-arg STEAM_LOGIN="$STEAM_LOGIN" \
Expand Down
1 change: 1 addition & 0 deletions test/build-hlds-cstrike.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ FIX_APPMANIFEST=true
INSTALL_COUNT=
LATEST=true
CACHE=
NO_CACHE=
NO_TEST=
NO_PUSH=true
STEAM_LOGIN=true
1 change: 1 addition & 0 deletions test/build-srcds-hl2mp.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ FIX_APPMANIFEST=
INSTALL_COUNT=
LATEST=true
CACHE=
NO_CACHE=
NO_TEST=
NO_PUSH=true
STEAM_LOGIN=
1 change: 1 addition & 0 deletions test/update-hlds-cstrike.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GAME=cstrike
GAME_UPDATE_COUNT=1
INSTALL_COUNT=
NO_PULL=true
NO_CACHE=
NO_TEST=
NO_PUSH=true
STEAM_LOGIN=true
1 change: 1 addition & 0 deletions test/update-srcds-hl2mp.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GAME=hl2mp
GAME_UPDATE_COUNT=1
INSTALL_COUNT=
NO_PULL=true
NO_CACHE=
NO_TEST=
NO_PUSH=true
STEAM_LOGIN=

0 comments on commit fc94fe2

Please sign in to comment.