vpetersson/tc-agent-mgr
TeamCity Agent Manager - A tool for automatic approval of build agents.
184
We've been using TeamCity for some time. However, the lack of 'Cloud' integration with Google Cloud made it hard to dynamically scale the build agent count up and down through an instance group (since you would have to manually approve the build agents).
This little script will periodically check if there are any unapproved workers, and automatically approve them.
Here's what you need to get this working:
$ docker run -t -d \
--name tc-agent-mgr \
-e TC_URL=https://your-ci.your-domain.com \
-e TC_USER=jsmith \
-e TC_PASS=SecretPassword \
vpetersson/tc-agent-mgr
TC_MAX_AGENT
: This will default to 3 (which is the limit for the free license).AGENT_WHITELIST_STRING
: Set this if you want to only approve agents with this string in the name.Please note that there is not a whole lot of security considerations in here. Any agent trying to register to your TeamCity server will automatically get approved (unless AGENT_WHITELIST_STRING
is set). Don't use this unless you understand that risk.
You may also want to create a new TeamCity group and only grant permission to the role 'Agent manager'. You can then make your new a member of this group and this group only.
docker pull vpetersson/tc-agent-mgr