Update the entrypoint

This commit is contained in:
zontreck 2024-11-09 00:28:17 -07:00
parent ec0d3761a2
commit bca93c4cb4

View file

@ -2,14 +2,23 @@
if [ -d /keys ]
then
echo "Installing SSH Keys..."
mkdir -pv /home/builder/.ssh
cp -v /keys/id_rsa ~/.ssh/
cp -v /keys/id_rsa.pub ~/.ssh/
chmod 0600 ~/.ssh/id_rsa
sleep 10
fi
echo "Logging into Docker..."
docker login git.zontreck.com -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
sleep 10
echo "Connecting agent"
java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -jar /agent.jar -url "https://ci.zontreck.com" -secret "$DOCKER_AGENT_SECRET" -name "BuilderHost" -workDir "/builder"
echo "Container stopping or crashed"
sleep 5