Wednesday, October 12, 2016

Trying @teamcity for #ContinuousIntegration - Part 2

Continuing from where we got stuck in the prior post for running a build on Trying @teamcity for #ContinuousIntegration - Part 1. Before I started working on the agent, I deleted two of the three builds in the queue.

Create the Teamcity agent


I learned that I must have an agent running. I executed the following docker command to create an agent that automatically registered itself on the Teamcity server as an unauthorized agent.


docker run -d -e SERVER_URL="http://teamcity-server-instance:8111" \
--name=teamcity-agent \
-p 9090:9090 \
-v $HOME/docker-shares/teamcity/agent/conf:/data/teamcity_agent/conf \
-e AGENT_NAME=teamcity-agent \
--link teamcity-server-instance:TSI \
jetbrains/teamcity-agent














Authorize the agent

Click on the 'Unauthorized' link next to the agent and click 'Authorize' on the dialog  that pops up.














Navigate back to 'Connected' tab where only authorized agents are listed.














The build that was in the queue kicked off while I was trying to take a screenshot and I missed it on the screenshot. Navigate to 'Projects' and you'll see a 'Success' status on your build job.








More work needed

I was not expecting the build job to actually determine that this is a maven Java project and compile the code automatically. I looked at the build log and confirmed as much.
















The work we did above is truly just 'Hello World'. There is a build steps section that I didn't look for earlier. For now, I successfully connected an agent and kicked off a job. Moving on to build steps on the next post.