3/31/2023 0 Comments Teamcity build chain![]() It’s all part of the standard TeamCity functionality, except for that it receives its new features and updates on a daily basis, as we use it for our internal dogfooding.Īt some point, this scale started posing some difficulties for us, as we noticed that during peak hours, newly triggered builds were sitting in the queue for half an hour or more, and basically did not start at all unless you manually moved it to the top. This is all handled by 2000+ build agents (although this number is not static as a lot of them are launched on demand and run builds in hosted environments, such as AWS).Īll of that is handled by our internal CI/CD server called buildserver which is running as a multi-node setup orchestrated by TeamCity. In total, it amounts to 7,500 projects, 50,000+ build configurations (jobs), and around 65,000 builds per day on average. James now contributes to the native products team, and has a BS in Computer Engineering.At JetBrains, we use a single TeamCity installation to build all of our products – including the giants like IntelliJ IDEA, P圜harm, Kotlin, as well as hundreds of plugins, and a lot of internal products and services, such as the website or this blog. He joined the company in 2016 as a Software Engineer in Support. James Waugh is a Software Engineer on the SDK division at Accusoft. Return " :: ".join(destSplit).encode('ascii')ĭotSource = nx.drawing.nx_pydot.to_pydot(graph).to_string() # Otherwise the beginning strings are cut off. # If there are no common elements, return the full name of the project. Match = sequenceMatcher.get_matching_blocks() SequenceMatcher = SequenceMatcher(None, topSplit, destSplit) Return the number of starting array elements that match in both.ĭestSplit = destProjectName.split(' :: ') Return srcResult.strip(), depResult.strip()ĭef trimProjectName(topProjectName, destProjectName): SrcResult = trimProjectName(topProjectName, srcProjectName).replace(" :: ", ".")ĭepResult = trimProjectName(topProjectName, depProjectName).replace(" :: ", ".") This is combined with the name in brackets. # If the project names start the same, cut off the common substring to be OutputGraph.add_edge(nodeName, depNodeName, color=edgeColor)Įlif all(attrs != edgeColor for attrs in outputGraph.values()):ĭef getNodeNames(topNode, srcNode, depNode): If not outputGraph.has_edge(nodeName, depNodeName): # We will add another edge if a different dependency exists, or if there is no edge NodeName, depNodeName = getNodeNames(topNode, source, dependency) Result.append(dependency)ĭef addDependencyToGraph(outputGraph, topNode, source, dependency, dependencyName): 'artifact-dependencies' : 'artifact-dependency'ĭependencyDict = nodeJsonįor dependency in dependencyDict]: ![]() 'snapshot-dependencies' : 'snapshot-dependency', GenerateGraph_impl(outputGraph, topNode, getProjectJson(dep))ĭef getDependencies(nodeJson, dependencyName): Url = ")".format(projectId, status))ĭef generateGraph_impl(outputGraph, topNode, node):ĪddDependenciesToGraph(outputGraph, topNode, node, 'artifact-dependencies')ĪddDependenciesToGraph(outputGraph, topNode, node, 'snapshot-dependencies')ĭef addDependenciesToGraph(outputGraph, topNode, node, dependencyName):įor dep in getDependencies(node, dependencyName):ĪddDependencyToGraph(outputGraph, topNode, node, dep, dependencyName) In code, it is utilized like so: def getProjectJson(projectId): guestAuth/ is used to simplify authentication. This will give us the properties of a project. We are only concerned with one endpoint here: /guestAuth/app/rest/buildTypes/id:/ The required libraries are requests, pydotplus, and networkx: pip install requests pydotplus networkxįor all network requests, such as that to the TeamCity API and Google Charts, the requests module is used. Render the graph utilizing the Dot language and Graphviz.For each of that project’s dependencies, recursively traverse them and construct a graph.This ID can be found in the settings of the TeamCity configuration in question./tcdependencygraph.py My_Project_ID The script is invoked by passing the TeamCity ID whose graph is requested. In many cases at Accusoft, we are tasked with commanding large TeamCity build chains, sometimes interacting with dozens of build configurations: build tests, run them, and build all their dependencies! Being able to visualize these relationships is a benefit to my team that allows them to discuss these relationships and discover potential issues, so I created a Python 2.7 script to do so.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |