roblox / chef-teamcity Goto Github PK
View Code? Open in Web Editor NEWTeamCity Chef cookbook
License: Apache License 2.0
TeamCity Chef cookbook
License: Apache License 2.0
This only_if
block โ
chef-teamcity/recipes/default.rb
Line 105 in e6df61c
buildAgent.properties
updated to point to the new server.If the service is installed, but not started/running, then the recipe will fail:
================================================================================
Error executing action `run` on resource 'dsc_resource[Setup TeamCity BuildAgent Service]'
================================================================================
Chef::Exceptions::PowershellCmdletException
-------------------------------------------
Powershell Cmdlet failed: PowerShell DSC resource MSFT_ServiceResource failed to execute Set-TargetResource functionality with error message:
The service 'TCBuildAgent' to create already exists with path
'C:\teamcity-agent\launcher\bin\TeamCityAgentService-windows-x86-32.exe -s
C:\teamcity-agent\launcher\conf\wrapper.conf'
+ CategoryInfo : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost
Resource Declaration:
---------------------
# In c:/chef/cache/cookbooks/teamcity/recipes/windows.rb
24: dsc_resource 'Setup TeamCity BuildAgent Service' do
25: resource :service
26: property :name, 'TCBuildAgent'
27: property :ensure, 'Present'
28: property :builtinaccount, 'LocalSystem'
29: case node['teamcity']['agent']['windows_service']['startuptype']
30: when 'Manual'
31: property :startuptype, 'Manual'
32: property :state, 'Stopped'
33: else
34: property :startuptype, 'Automatic'
35: property :state, 'Running'
36: end
37: property :description, 'TeamCity Build Agent Service'
Compiled Resource:
------------------
# Declared in c:/chef/cache/cookbooks/teamcity/recipes/windows.rb:24:in `from_file'
dsc_resource("Setup TeamCity BuildAgent Service") do
action [:run]
default_guard_interpreter :default
properties {name=>"TCBuildAgent", ensure=>"Present", builtinaccount=>"LocalSystem", startuptype=>"Automatic", state=>"Running", description=>"TeamCity Build Agent Service", displayname=>"TeamCity Build Agent", path=>"C:\\teamcity-agent\\launcher\\bin\\TeamCityAgentService-windows-x86-32.exe -s C:\\teamcity-agent\\launcher\\conf\\wrapper.conf"}
resource :service
reboot_action :nothing
declared_type :dsc_resource
cookbook_name "teamcity"
recipe_name "windows"
end
When a new version of the agent package is available on the server
Then it is downloaded and unpacked on top of the current agent installation
And the agent is restarted to run as a new version
When a new version of the agent package is available on the server
Then it is downloaded but unpacking on top of the current agent installation fails
because the agent process locks the files
When a new version of the agent package is available on the server
And it is already downloaded
Then no attempt at reinstall is made which hides the previous issue
Currently the plist template (https://github.com/Roblox/chef-teamcity/blob/master/templates/default/jetbrains.teamcity.BuildAgent.plist.erb#L20) makes reference to using launcher.
Lately JetBrains' recommended method is:
bin/agent.sh run
https://www.jetbrains.com/help/teamcity/setting-up-and-running-additional-build-agents.html#LaunchAgent+Approach
Step 6 states:
6. After the build agent upgrades from the TeamCity server, copy the buildAgent/bin/jetbrains.teamcity.BuildAgent.plist file to the $HOME/Library/LaunchAgents/ directory. If you don't want TeamCity to start under the root permissions, specify the UserName key in the .plist file, for example:
During manual attempt of the steps, the resulting plist file has aforementioned bin/agent.sh run
rather than the current method, which is:
/opt/teamcity-agent/launcher/bin/TeamCityAgentService-macosx-universal-32 -c ../conf/wrapper.conf
(this causes a problem with new machines)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.