diff --git a/build.sh b/build.sh index 98ac9717..81e14e76 100755 --- a/build.sh +++ b/build.sh @@ -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'" @@ -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:-} @@ -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:-} @@ -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" \ @@ -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" \ diff --git a/test/build-hlds-cstrike.env b/test/build-hlds-cstrike.env index 9a35b1ce..31c35fc0 100644 --- a/test/build-hlds-cstrike.env +++ b/test/build-hlds-cstrike.env @@ -13,6 +13,7 @@ FIX_APPMANIFEST=true INSTALL_COUNT= LATEST=true CACHE= +NO_CACHE= NO_TEST= NO_PUSH=true STEAM_LOGIN=true diff --git a/test/build-srcds-hl2mp.env b/test/build-srcds-hl2mp.env index bb6a9bbc..b6dd2246 100644 --- a/test/build-srcds-hl2mp.env +++ b/test/build-srcds-hl2mp.env @@ -13,6 +13,7 @@ FIX_APPMANIFEST= INSTALL_COUNT= LATEST=true CACHE= +NO_CACHE= NO_TEST= NO_PUSH=true STEAM_LOGIN= diff --git a/test/update-hlds-cstrike.env b/test/update-hlds-cstrike.env index b3b73400..b118e863 100644 --- a/test/update-hlds-cstrike.env +++ b/test/update-hlds-cstrike.env @@ -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 diff --git a/test/update-srcds-hl2mp.env b/test/update-srcds-hl2mp.env index eabb52c9..6510fa2a 100644 --- a/test/update-srcds-hl2mp.env +++ b/test/update-srcds-hl2mp.env @@ -10,6 +10,7 @@ GAME=hl2mp GAME_UPDATE_COUNT=1 INSTALL_COUNT= NO_PULL=true +NO_CACHE= NO_TEST= NO_PUSH=true STEAM_LOGIN=