Add VSTS_TOKEN_FILE support
This commit is contained in:
Родитель
321792063b
Коммит
01d65c3375
10
README.md
10
README.md
|
@ -83,6 +83,16 @@ docker run \
|
|||
-it microsoft/vsts-agent:ubuntu-16.04-tfs-2017
|
||||
```
|
||||
|
||||
A more secure option for passing the personal access token is supported by mounting a file that contains the token into the container and specifying the location of this file with the `VSTS_TOKEN_FILE` environment variable. For instance:
|
||||
|
||||
```
|
||||
docker run \
|
||||
-v /path/to/my/token:/vsts-token
|
||||
-e VSTS_ACCOUNT=<name> \
|
||||
-e VSTS_TOKEN_FILE=/vsts-token \
|
||||
-it microsoft/vsts-agent
|
||||
```
|
||||
|
||||
Whether targeting VSTS or TFS, agents can be further configured with additional environment variables:
|
||||
|
||||
- `VSTS_AGENT`: the name of the agent (default: `"$(hostname)"`)
|
||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
|||
|
||||
UBUNTU_VERSION=$1
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -20,10 +20,15 @@ if [ -z "$VSTS_ACCOUNT" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -43,7 +48,7 @@ cleanup() {
|
|||
if [ -e config.sh ]; then
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -52,7 +57,7 @@ trap 'cleanup; exit 143' TERM
|
|||
|
||||
echo Determining matching VSTS agent...
|
||||
VSTS_AGENT_URL=$(curl -LsS \
|
||||
-u "user:$VSTS_TOKEN" \
|
||||
-u user:$(cat "$VSTS_TOKEN_FILE") \
|
||||
-H 'Accept:application/json;api-version=3.0-preview' \
|
||||
"https://$VSTS_ACCOUNT.visualstudio.com/_apis/distributedtask/packages/agent?platform=ubuntu.$UBUNTU_VERSION-x64" \
|
||||
| jq -r '.value | map([.version.major,.version.minor,.version.patch,.downloadUrl]) | sort | .[length-1] | .[3]')
|
||||
|
@ -71,7 +76,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "https://$VSTS_ACCOUNT.visualstudio.com" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
|||
|
||||
UBUNTU_VERSION=$1
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -20,10 +20,15 @@ if [ -z "$VSTS_ACCOUNT" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -43,7 +48,7 @@ cleanup() {
|
|||
if [ -e config.sh ]; then
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -52,7 +57,7 @@ trap 'cleanup; exit 143' TERM
|
|||
|
||||
echo Determining matching VSTS agent...
|
||||
VSTS_AGENT_URL=$(curl -LsS \
|
||||
-u "user:$VSTS_TOKEN" \
|
||||
-u user:$(cat "$VSTS_TOKEN_FILE") \
|
||||
-H 'Accept:application/json;api-version=3.0-preview' \
|
||||
"https://$VSTS_ACCOUNT.visualstudio.com/_apis/distributedtask/packages/agent?platform=ubuntu.$UBUNTU_VERSION-x64" \
|
||||
| jq -r '.value | map([.version.major,.version.minor,.version.patch,.downloadUrl]) | sort | .[length-1] | .[3]')
|
||||
|
@ -71,7 +76,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "https://$VSTS_ACCOUNT.visualstudio.com" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
|||
|
||||
UBUNTU_VERSION=$1
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,VSTS_ACCOUNT,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -20,10 +20,15 @@ if [ -z "$VSTS_ACCOUNT" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -43,7 +48,7 @@ cleanup() {
|
|||
if [ -e config.sh ]; then
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -52,7 +57,7 @@ trap 'cleanup; exit 143' TERM
|
|||
|
||||
echo Determining matching VSTS agent...
|
||||
VSTS_AGENT_URL=$(curl -LsS \
|
||||
-u "user:$VSTS_TOKEN" \
|
||||
-u user:$(cat "$VSTS_TOKEN_FILE") \
|
||||
-H 'Accept:application/json;api-version=3.0-preview' \
|
||||
"https://$VSTS_ACCOUNT.visualstudio.com/_apis/distributedtask/packages/agent?platform=ubuntu.$UBUNTU_VERSION-x64" \
|
||||
| jq -r '.value | map([.version.major,.version.minor,.version.patch,.downloadUrl]) | sort | .[length-1] | .[3]')
|
||||
|
@ -71,7 +76,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "https://$VSTS_ACCOUNT.visualstudio.com" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
|
@ -10,10 +10,15 @@ if [ -z "$TFS_URL" ]; then
|
|||
export TFS_URL=https://$TFS_HOST/tfs
|
||||
fi
|
||||
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
if [ -z "$VSTS_TOKEN_FILE" ]; then
|
||||
if [ -z "$VSTS_TOKEN" ]; then
|
||||
echo 1>&2 error: missing VSTS_TOKEN environment variable
|
||||
exit 1
|
||||
fi
|
||||
VSTS_TOKEN_FILE=/vsts/.token
|
||||
echo -n $VSTS_TOKEN > "$VSTS_TOKEN_FILE"
|
||||
fi
|
||||
unset VSTS_TOKEN
|
||||
|
||||
if [ -n "$VSTS_AGENT" ]; then
|
||||
export VSTS_AGENT="$(eval echo $VSTS_AGENT)"
|
||||
|
@ -29,7 +34,7 @@ cd /vsts/agent
|
|||
cleanup() {
|
||||
./bin/Agent.Listener remove --unattended \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN"
|
||||
--token $(cat "$VSTS_TOKEN_FILE")
|
||||
}
|
||||
|
||||
if [ -e .agent ]; then
|
||||
|
@ -40,7 +45,7 @@ fi
|
|||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
export VSO_AGENT_IGNORE=_,MAIL,OLDPWD,PATH,PWD,VSTS_AGENT,TFS_HOST,TFS_URL,VSTS_TOKEN_FILE,VSTS_TOKEN,VSTS_POOL,VSTS_WORK,VSO_AGENT_IGNORE
|
||||
if [ -n "$VSTS_AGENT_IGNORE" ]; then
|
||||
export VSO_AGENT_IGNORE=$VSO_AGENT_IGNORE,VSTS_AGENT_IGNORE,$VSTS_AGENT_IGNORE
|
||||
fi
|
||||
|
@ -51,7 +56,7 @@ source ./env.sh
|
|||
--agent "${VSTS_AGENT:-$(hostname)}" \
|
||||
--url "$TFS_URL" \
|
||||
--auth PAT \
|
||||
--token "$VSTS_TOKEN" \
|
||||
--token $(cat "$VSTS_TOKEN_FILE") \
|
||||
--pool "${VSTS_POOL:-Default}" \
|
||||
--work "${VSTS_WORK:-_work}" \
|
||||
--replace & wait $!
|
||||
|
|
Загрузка…
Ссылка в новой задаче