Repository navigation
Add TeamCity plugin #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+5,661
−0
Merged
Add TeamCity plugin #195
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e8ead96
Add TeamCity plugin shell (work in progress)
claude 7f2cd90
TeamCity: import projects, build configurations and agents
claude 34d5032
TeamCity: add data streams (work in progress)
claude 798bdc6
TeamCity: data streams for builds, status, tests, queue and agents
claude a7324a0
TeamCity: add custom types and default content (work in progress)
claude 74a00d9
TeamCity: dashboards, server version fix and README
claude b0d0999
TeamCity: add dashboard screenshots and fix date parsing
claude 73a2165
Add TeamCity plugin to CODEOWNERS
claude f0f508b
TeamCity: fix issues found in code review
claude 31d8184
TeamCity: document the agent permission Project viewer lacks
claude 257f622
TeamCity: mark the plugin as SquaredUp Labs
claude 7d3527d
TeamCity: show unauthorized agents on the Agent dashboard
claude 6d1f6ad
TeamCity: set author name to SquaredUp Labs
claude 1ee5394
Merge remote-tracking branch 'origin/main' into claude/vibrant-meitne…
clarkd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Authenticate", | ||
| "dataStream": { | ||
| "name": "server" | ||
| }, | ||
| "required": true, | ||
| "error": "Could not connect to TeamCity. Check the server URL is reachable from SquaredUp and the access token is valid and has not expired.", | ||
| "success": "Connected to TeamCity successfully." | ||
| }, | ||
| { | ||
| "displayName": "Check data access", | ||
| "dataStream": { | ||
| "name": "buildTypes", | ||
| "config": { | ||
| "errorOnEmptyResults": true | ||
| } | ||
| }, | ||
| "required": false, | ||
| "error": "Connected, but no build configurations were returned. Check the user the access token belongs to can view at least one project.", | ||
| "success": "Build configurations are accessible." | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [ | ||
| { | ||
| "name": "Project", | ||
| "sourceType": "Project", | ||
| "icon": "folder-tree", | ||
| "singular": "Project", | ||
| "plural": "Projects" | ||
| }, | ||
| { | ||
| "name": "Build Configuration", | ||
| "sourceType": "Build Configuration", | ||
| "icon": "gears", | ||
| "singular": "Build Configuration", | ||
| "plural": "Build Configurations" | ||
| }, | ||
| { | ||
| "name": "Agent", | ||
| "sourceType": "Agent", | ||
| "icon": "server", | ||
| "singular": "Agent", | ||
| "plural": "Agents" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| { | ||
| "name": "agentList", | ||
| "displayName": "Agent List", | ||
| "description": "Authorized TeamCity build agents, with their pool, IP address and operating system", | ||
| "tags": [ | ||
| "Inventory" | ||
| ], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "agents", | ||
| "getArgs": [ | ||
| { | ||
| "key": "locator", | ||
| "value": "authorized:true,connected:any,enabled:any,count:1000" | ||
| }, | ||
| { | ||
| "key": "fields", | ||
| "value": "nextHref,agent(id,name,ip,pool(id,name),environment(osType,osName))" | ||
| } | ||
| ], | ||
| "paging": { | ||
| "mode": "nextUrl", | ||
| "in": { | ||
| "realm": "payload", | ||
| "path": "nextHref" | ||
| } | ||
| }, | ||
| "postRequestScript": "pagedList.js", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": "none", | ||
| "visibility": { | ||
| "type": "hidden" | ||
| }, | ||
| "metadata": [ | ||
| { | ||
| "name": "id", | ||
| "displayName": "ID", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Agent", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "pool.name", | ||
| "displayName": "Pool", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "pool.id", | ||
| "displayName": "Pool ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "ip", | ||
| "displayName": "IP Address", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "environment.osType", | ||
| "displayName": "OS Type", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "environment.osName", | ||
| "displayName": "OS", | ||
| "shape": "string" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| { | ||
| "name": "agents", | ||
| "displayName": "Agents", | ||
| "description": "Live status of TeamCity build agents, with the build each is running now, its pool and operating system", | ||
| "tags": [ | ||
| "Agents" | ||
| ], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "agents", | ||
| "getArgs": [ | ||
| { | ||
| "key": "locator", | ||
| "value": "{{ (() => { const ids = (typeof agent !== 'undefined' && Array.isArray(agent) ? agent : []).map(a => Array.isArray(a.rawId) ? a.rawId[0] : a.rawId).filter(Boolean); const idPart = ids.length === 1 ? `id:${ids[0]}` : ids.length > 1 ? `item:(${ids.map(i => `id:${i}`).join('),item:(')})` : ''; return [idPart, `authorized:${String(typeof includeUnauthorized === 'undefined' ? '' : includeUnauthorized) === 'true' ? 'any' : 'true'}`, 'connected:any', 'enabled:any', 'count:500'].filter(Boolean).join(','); })() }}" | ||
| }, | ||
| { | ||
| "key": "fields", | ||
| "value": "nextHref,agent(id,name,connected,enabled,authorized,uptodate,ip,lastActivityTime,pool(id,name),environment(osType,osName),build(id,number,buildTypeId,buildType(id,name,projectName)),enabledInfo(comment(text)),authorizedInfo(comment(text)),webUrl)" | ||
| } | ||
| ], | ||
| "paging": { | ||
| "mode": "nextUrl", | ||
| "in": { | ||
| "realm": "payload", | ||
| "path": "nextHref" | ||
| } | ||
| }, | ||
| "postRequestScript": "pagedList.js", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": "none", | ||
| "ui": [ | ||
| { | ||
| "type": "objects", | ||
| "name": "agent", | ||
| "label": "Agent(s)", | ||
| "matches": { | ||
| "sourceType": { | ||
| "type": "oneOf", | ||
| "values": [ | ||
| "Agent" | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "toggle", | ||
| "name": "includeUnauthorized", | ||
| "label": "Include unauthorized agents", | ||
| "defaultValue": false | ||
| } | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "name": "id", | ||
| "displayName": "ID", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Agent", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "sourceId": "id", | ||
| "sourceType": "Agent", | ||
| "name": "name" | ||
| }, | ||
| { | ||
| "name": "status", | ||
| "displayName": "Status", | ||
| "shape": [ | ||
| "state", | ||
| { | ||
| "map": { | ||
| "error": [ | ||
| "Disconnected" | ||
| ], | ||
| "warning": [ | ||
| "Disabled", | ||
| "Outdated", | ||
| "Unauthorized" | ||
| ], | ||
| "success": [ | ||
| "Healthy" | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "computed": true, | ||
| "valueExpression": "{{ $['connected'] === false ? 'Disconnected' : $['authorized'] === false ? 'Unauthorized' : $['enabled'] === false ? 'Disabled' : $['uptodate'] === false ? 'Outdated' : 'Healthy' }}" | ||
| }, | ||
| { | ||
| "name": "connected", | ||
| "displayName": "Connected", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "enabled", | ||
| "displayName": "Enabled", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "authorized", | ||
| "displayName": "Authorized", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "uptodate", | ||
| "displayName": "Up to Date", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "build.number", | ||
| "displayName": "Current Build", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "build.buildType.name", | ||
| "displayName": "Current Build Configuration", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "build.buildTypeId", | ||
| "displayName": "Current Build Configuration ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "sourceId": "build.buildTypeId", | ||
| "sourceType": "Build Configuration", | ||
| "name": "build.buildType.name" | ||
| }, | ||
| { | ||
| "name": "build.id", | ||
| "displayName": "Current Build ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "pool.name", | ||
| "displayName": "Pool", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "pool.id", | ||
| "displayName": "Pool ID", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "environment.osName", | ||
| "displayName": "OS", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "environment.osType", | ||
| "displayName": "OS Type", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "ip", | ||
| "displayName": "IP Address", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "lastActivityTime", | ||
| "displayName": "Last Activity", | ||
| "shape": "date" | ||
| }, | ||
| { | ||
| "name": "enabledInfo.comment.text", | ||
| "displayName": "Disabled Reason", | ||
| "shape": "string" | ||
| }, | ||
| { | ||
| "name": "authorizedInfo.comment.text", | ||
| "displayName": "Unauthorized Reason", | ||
| "shape": "string", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "webUrl", | ||
| "displayName": "URL", | ||
| "shape": [ | ||
| "url", | ||
| { | ||
| "label": "Open in TeamCity" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.