I've recently installed TeamCity 2017.2.3 (build 541047) and Octopus Deploy 2018.1.5 and originally was having success running builds and creating packages in TeamCity, but now my build agent shows all of my build steps as incompatible after a service restart.
I've uninstalled and reinstalled the buildagent, plugins (I use Node.JS build runner, Octopus Deploy integration, and xUnit) and rebuilt each of the build steps, but still run into the same problem
Build Step List
Anyone know what would be causing this issue?
Each agent should have a list of global parameters that are picked up from the OS or manually configured from the agent properties file on the machine. These are things like the path, dotnet versions, npm etc.
http(s)://<tc root>/agentDetails.html?id=<agent id>&tab=agentParameters
(You can get to the above by clicking on the agent you want to inspect)
You can then override or add to these from the root project all the way up the project tree to the build configuration.
The message you are getting is saying is that in order for the build to run it needs to have an agent with those parameters configured. Could you give a screen grab of what your build agent parameters are.
Here is an example from one of my build agents which shows some of the configuration parameters that you need.
You should not need to add these, they should be picked up automatically by the agent.
First make sure these dependencies are actually installed.
If missing install and restart the agent service (required to pick up new configuration properties).
Possibly try a machine restart in case newly installed components require a reboot.
Failing that check to see what permissions the build agent service is running under. It might not have permissions needed to poll the system but I have never seen that.
Related
I am trying to setup teamcity with Github repository.
After setting up projec, When I got "Paramater Tab", It asks some configuration parameter value. See in below screenshot.
For Now I am not giving any value and click on "Run" button on top right corner.
Then it gives some warning.
Warning: No enabled compatible agents for this build configuration.
Please register a build agent or tweak build configuration requirements.
What is the problem? How can I make it run?
It looks like your agent doesn't have Nuget installed, but your build configuration requires it.
To install Nuget on the build agent:
In TeamCity, go to Administration (top right of any page).
Go to Tools in the menu down the left hand side of that page.
You should now see a list of available tools.
Scroll down the list until you find Nuget.exe in the list.
You may already have multiple versions installed in which case you probably just need to click Make Default on one of them.
I you have no Nuget versions installed then click the Install Version button and pick the version you want to install.
This will distribute the Nuget tool to all build agents that can run it and it should resolve your error.
Please see this TeamCity documentation link for more information.
For TeamCity to run, you have to have TeamCity installed, the tooling configured (as the previous answer suggested you were missing NuGet) but you also need to install and configure build agents that can actually run the build. By default, the TeamCity instance does not install any build agents, you have to install and configure those yourself.
Seems that the agent wasn't up, try the following:
cd /home/admin/TeamCity/buildAgent_latest/bin
sudo ./agent.sh start
This solution worked for me.
C:\TeamCity\buildAgent\bin>agent.bat start
Looked on Teamcity help as well but did not answer the question properly. This was simple and after starting the agent from teamcity folder location the project got up and running. Thank you.
I currently have one of my build agents in TeamCity running under a specific user due to one of the build steps. The build agent supports a couple different projects, so I want to add an additional build agent. I have successfully done so, but upon doing so the new build agent starts working, but my older build agent gets disconnected and states "Agent has unregistered." Now I am using the same user to try and run both build agents, so not sure if that is whats causing the issue or not. Both build agents are on the same machine and do have distinct names. I have tried to restart the agents in hope that it would fix itself, but have not been successful.
There are several resources covering setup of multiple build agents on the same machine, you can examine them if you wish.
Here are requirements from official documentation:
The agents are installed in separate directories.
The agents have the distinctive workDir and tempDir directories in the buildAgent.properties file.
Values for the name and ownPort properties of buildAgent.properties are unique.
No builds running on the agents have the absolute checkout directory specified.
Please, make sure that port number is changed, as this is most obvious reason why build agent could be terminated. Also, check that each build agent has its own unique name.
Otherwise, please check each build agent logs and - if it won't be clear -, share error here.
I came across an interesting issue. I want to build nuget packages with Teamcity. I did set up the configuration which is really straight forward (Good job JetBrains!)
However I am not able to run it on one of our build agents.
The agent does pass the agent requirements for the configuration, but next to it's name the following is shown: not allowed to run this configuration
My question: Why?
On the agent configuration parameters page I have Nuget as possible configurations:
teamcity.tool.NuGet.CommandLine.2.8.2.nupkg D:\BuildAgent\tools\NuGet.CommandLine.2.8.2.nupkg
teamcity.tool.NuGet.CommandLine.DEFAULT.nupkg D:\BuildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg
We have a second build agent which is able to run Nuget Packager configuration.
The main difference between this two machines is that one is a Windows 8, version 6.2 machine (not allowed to run this configuration) and the other one is a Windows 7, version 6.1 (allowed run this configuration)
We are running:
TeamCity Enterprise 8.0.5 (build 27692)
Any hints and help will be greatly appreciated!
Thank you!
Most likely the agent is configured to run only explicitly assigned configurations.
Plesase, check the Agents -> -> "Compatible configurations" tab.
There is a combo box with options "Run all compatible" / "Run assined .. ". Make sure "Run all compatible" is selected
You may not always be in a position to Run all compatible, In that case you can go to Agents--> Particular agent --> comaptible configurations --> Assign configurations --> Search and select the specific Job or build.
I am using TeamCity 8.1.3 and have one task in the build queue and compatible enabled agent.
In "Build Queue" teamcity says that task "Can run on" - "2 agents"
Both agents are idle.
I tried to reinstall teamcity, reinstall buildAgent and install agent on another machine.
Tried to run agent as root. I read all agent logs and didn't find any errors; only warnings for not installed VCS tools (i need only git and its installed - no warning for it).
Why wont the agent run my task?
If the VCS tools aren't installed then TeamCity can't pull down your code and run the agent.
From the TeamCity documentation http://confluence.jetbrains.com/display/TCD8/Git+(JetBrains):
Git support in TeamCity is implemented as a plugin. Git needs to be installed on the server machine and, if the agent-side checkout is used, on the agents.
and
[Build configuration] will run only on the agents where git was detected or specified in the agent properties.
So you need install git.
This page covers installation instructions for Windows, Linux and Mac: http://git-scm.com/book/en/Getting-Started-Installing-Git. This SO post discusses installation as well: Git for beginners: The definitive practical guide
I can see two possible reasons
One of the implicit requirements not fulfilled. You need to check the enqueued build info for this, it tells why exactly the build is in the queue with compatible agents but not running. Examples can be: limitation on simultaneous builds in build or template configuration, shared resources unavailable etc. This would be listed in the little popup next to the enqueued build label
I've seen this happening when a requirement wasnt fulfilled initially (I had build configuration limited to 1 build at a time) when the build was enqueued, then it was corrected but the queue cached this requirement. Re-enqueuing the build sorted that.
Hover by mouse cursor to your VCS engine (e.g. git) and maybe you'll see there this message:
Changes have not been collected yet
In that case check performance of your TC and vcs server. (this I just guess from the message)
I've got TeamCity installed and working, and I need to have a build step run on a particular build agent (everything's running on Windows, but we have a Mac portion I need to build as well).
How do I tell the build step what agent I want it to run on? I've seen this, but that references an entire build; I just want a particular step to run on a given agent.
Is this even possible?
From what I am aware of, it is not possible. You may want a separate build configuration to build for mac.
Sharma is somewhat correct, and KIR has it completely correct.
I needed a build configuration for each server, Mac and Windows. Then I set a snapshot dependency from the Windows build on the Mac build (to make sure the Mac version builds completely first) and a artifact dependency from the same (to copy the resulting build output from the Mac to the Windows box). Then I modified the build process on the Windows box to include the artifacts, and voila, works like a charm.