-
-
Save patst/52ef14dd3dbe7f414ee3966582e2dd4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo $@ | |
echo "start" | |
cd /home/azuredevopsuser | |
mkdir agent | |
cd agent | |
AGENTRELEASE="$(curl -s https://api.github.com/repos/Microsoft/azure-pipelines-agent/releases/latest | grep -oP '"tag_name": "v\K(.*)(?=")')" | |
AGENTURL="https://vstsagentpackage.azureedge.net/agent/${AGENTRELEASE}/vsts-agent-linux-x64-${AGENTRELEASE}.tar.gz" | |
echo "Release "${AGENTRELEASE}" appears to be latest" | |
echo "Downloading..." | |
wget -O agent.tar.gz ${AGENTURL} | |
tar zxvf agent.tar.gz | |
chmod -R 777 . | |
echo "extracted" | |
./bin/installdependencies.sh | |
echo "dependencies installed" | |
sudo -u azuredevopsuser ./config.sh --unattended --url $1 --auth pat --token $2 --pool $3 --agent $4 --acceptTeeEula --work ./_work --runAsService | |
echo "configuration done" | |
./svc.sh install | |
echo "service installed" | |
./svc.sh start | |
echo "service started" | |
echo "config done" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment