JetBrains TeamCity: Agent Executor Mode

68 Views Asked by At

I setup an agent to connect to our server. Starting the agent with ./bin/agent.sh run respectively ./bin/agent.sh start and ./bin/agent.sh stop works fine; everything as expected.

However, I also saw the option to start the agent in executor mode:

./bin/agent.sh executor BUILD_FILE [BUILD_STEP] - to run a single build or build step and exit after that (executor mode)

I'm interested if this is a viable alternative to running the agent in daemon mode and how one would go about to start the agent like this. I imagined that the BUILD_FILE is passed from the server to the agent, or that it can be fetched from the server somehow. However I could not find out where this BUILD_FILE is accessible on the agent or on the server.

How do I setup TeamCity so that agents run in executor mode?

Can this even be done?

Thank you in advance!

1

There are 1 best solutions below

1
Alexander Pletnev On

It looks to me like it's not yet a stable feature, or it's not intended for public use given that there still are some open tickets on YouTrack regarding it's support:

  • TW-78134 Add new operation mode to execute all the build stages before the build itself
  • TW-82505 Proper plugin support for exec mode of TeamCity agent

If you want to spin up the agents dynamically according to the current load level, you might want to look into TeamCity integration with cloud solutions:

TeamCity integration with cloud (IaaS) solutions allows TeamCity to provide virtual machines running TeamCity agents on-demand. This allows TeamCity to automatically scale the number of active build agents depending on the current workload.

...

The following Cloud solutions are supported out of the box (see their dedicated articles for more details):

  • Amazon EC2
  • VMWare vSphere
  • Kubernetes

Available as non-bundled plugins:

  • Windows Azure
  • Google Cloud
  • Others

I also saw your question on Jetbrains support page and if it's still unanswered there, I'm afraid there will be no other answers here either.