[CI] Fix the preview timeout potential failure
Summary:
While the preview is working, the timeout might not. This timeout is implemented by spawning an at command to stop the docker container running the website. It is run from the build directory of the build and at memorize this directory, trying to cd into it before the command is run. This is an issue especially on CI because the build directory might very well have been deleted before the command is run, failing to stop the container.
This diff fixes the issue by spawning the at command from the user home directory instead.
Test Plan:
Change the preview duration to 2 minutes for the e.cash website by appending timeout_minutes: 2 to the docker configuration, then:
./contrib/teamcity/build-configurations.py preview-e.cash rm -rf ./abc-ci-builds/preview-e.cash
Run docker ps, check the preview is running fine.
Wait a couple minutes, run docker ps again and check the container has been stopped successfully.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D13680