CM2Walki / steamcmd

Minimal image containing Valve's SteamCMD binary: https://hub.docker.com/r/cm2network/steamcmd/

Home Page:https://CM2.Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No sentry file when using root variant

m21-cerutti opened this issue · comments

Hello, i am using steamcmd inside a CI Pipeline and i use the root variant.
I needed to install gettext-base in order to use envsubst.
Now that the weird things, i can login but it doesn't create sffn* file that i want, in order to cache it, and to don't put anymore the Steam Guard code.
I don't find it either with find command, and in the steam user variant it create the file in /home/steam/Steam

I have setup a CI pipeline example in this repo and I'm using it in production:

https://github.com/CM2Walki/steampipe

Can you check the readme and see if that's what you are looking for?

No but i have tested something.
I have tried on a local docker container to investigate with steam user and it now works.
su steam -c "./steamcmd.sh +login USERNAME PASSWORD +quit" first and then set steamGuard code if fails.

If we don't use steam user (just ./steamcmd.sh without su), it will work without errors but it will not create sentry files.

I will now test if this tip work inside my CI pipeline and repport back if it works.

Yes it was this problem. I leave the response here for other people.

# Test if need Steam Guard Code 
STEAM_EXIT=0
su -l steam -c "/home/steam/steamcmd/steamcmd.sh +login "$STEAM_BUILD_USERNAME" "$STEAM_BUILD_PASSWORD" +quit" || STEAM_EXIT=$?
echo "Test login with $STEAM_EXIT"

# Push build to Steam
if [ -z $STEAM_EXIT -o $STEAM_EXIT -eq 0 ]; then 
    su -l steam -c "/home/steam/steamcmd/steamcmd.sh +login '$STEAM_BUILD_USERNAME' '$STEAM_BUILD_PASSWORD' +run_app_build '$PWD/steam/app_build.vdf' +quit";
elif [ $STEAM_EXIT -eq 5 -a -z $STEAM_GUARD_CODE ]; then
    echo "Need STEAM_GUARD_CODE variable in CI.";
    exit 5
elif [ $STEAM_EXIT -eq 5 ]; then
    echo "Register STEAM_GUARD_CODE...";
    su -l steam -c "/home/steam/steamcmd/steamcmd.sh +set_steam_guard_code '$STEAM_GUARD_CODE' +login '$STEAM_BUILD_USERNAME' '$STEAM_BUILD_PASSWORD' +run_app_build '$PWD/steam/app_build.vdf' +quit";
else
   echo "Unknow error, STEAM_EXIT=$STEAM_EXIT"
    exit $STEAM_EXIT
fi