tfs-cli | platform CLI for Microsoft Team Foundation Server | DevOps library
kandi X-RAY | tfs-cli Summary
kandi X-RAY | tfs-cli Summary
Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tfs-cli
tfs-cli Key Features
tfs-cli Examples and Code Snippets
Community Discussions
Trending Discussions on tfs-cli
QUESTION
I want to show KPIs (Key Performance Indicator) on my SharePoint. My Datasource will be my TFS (Azure DevOps). For example showing the planned and finished Tasks for a Sprint on SharePoint and generate a graph out of it.
I saw that in Microsoft PowerApps - which are integrateable in my SharePoint-View - there are DevOps-Connectors, but i didnt rly saw a possibility to aggregate my task-statistics (planned / finished in a sprint) and show them.
Solution
Writing a C#-Backend that has a TFS-Client running.
- Can I use this for a Power-App-CustomConnector?
- Is there another way to acess data in a PowerApp from a REST-API?
- Worst Case the Backend will have shedule to create and update SharePoint-Tables with my TFS-Stats
What is the best way to aggregate and show my tfs (azure devOps) statistics on my sharepoint page?
...ANSWER
Answered 2021-Feb-17 at 14:59I'd recommend using Power BI, I use it for my Azure DevOps KPIs. You should be able to embed your Power BI reports within SharePoint easily. Power BI has ready-made connectors for aggregating work item data via the new Analytics Views preview feature. You'll want to start by enabling it within your Preview Features:
Once you have the feature enabled, create an analytics view that aggregates the data you'll use in Power BI (or use a default view):
- Creating an Analytics View: https://docs.microsoft.com/en-us/azure/devops/report/powerbi/analytics-views-create?view=azure-devops
After that, go ahead and open Power BI to connect to your Analytics View and start composing your KPI dashboard:
- Create a Power BI report with a default Analytics view: https://docs.microsoft.com/en-us/azure/devops/report/powerbi/create-quick-report?view=azure-devops
After you've finished your report, embed it within SharePoint:
- Power BI - Embed a Report in SharePoint: https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-embed-report-spo
QUESTION
I am working on a build to run a powershell script on a remote machine, using the VSTS task :
I currently am using TFS2017 on premise, and this is version 1 of that task. There is a version 3 available on github here : https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/PowerShellOnTargetMachinesV3
I am having an issue with this task failing, and I have read elsewhere that this version has a fix for my issue, so I want to update it if possible. I tried a few ways to do this, but I cannot work out what I am supposed to be doing. You would think there would be an update button in TFS! Well, there is, but it requests that you provide a .VISX file. Which the repo in GIT does not have.
I've tried running the steps in this other post: How to update the built-in Microsoft task library in TFS 2017? But running the command "npm run package -- --version " doesn't generate the VISX.
I tried running :
...ANSWER
Answered 2020-Feb-20 at 09:08Since you are working on TFS on-premise, the task version will not auto update. You need to manually install "PowerShell on Target Machines" task version 3.0
You just need to download the source code and package it as an extension, finally upload and install your extension. There are some steps updated:
Get the package tool (tfx-cli)
You can install or update the TFS Cross Platform Command Line Interface (tfx-cli) using npm, a component of Node.js, from your command line.
npm i -g tfx-cli
Package your extension in a .vsix file
tfx extension create --manifest-globs vss-extension.json
More details please refer this official tutorial: Package, publish extensions.
QUESTION
TFS 2018u1. I'm building an extension with custom context menu commands for release definitions. I'd like some of them to be conditionally invisible (upon the rights of the current user). Any way to hide them?
Deliberately not calling VSS.register()
doesn't help; the custom commands are still there, just do nothing.
It's not a security measure, it's a usability thing (the menu is getting crowded).
EDIT: in the Contribution data structure there's a property called constraints
. It's not documented, no idea where it comes from. Probably the manifest. The only mention of constraints I could find is in the TFX tool sources. Apparently, constraints
is a valid value in the manifest JSON (probably under the contribution object), and it's supposed to be an array. One assumes, one of ContributionConstraint
objects. The latter is kind of documented.
A constraint object has a name
property that, according to the docs, contains a reference to an IContributionFilter
class. I couldn't find any mentions of that class neither in docs nor in TypeScript sources. However, there's an interface Microsoft.VisualStudio.Services.ExtensionManagement.Sdk.Server.IContributionFilter
in assembly Microsoft.VisualStudio.Services.ExtensionManagement.Sdk.Server.dll
, and it has a Name
property. There are derived classes in bin\Plugins\Microsoft.VisualStudio.Services.ExtensionManagement.Sdk.Plugins.dll
:
- ExtensionLicensedFilter
- FeatureFlagFilter
- LegacyFeatureEnabledFilter
- ActiveExtensionFilter
- FeatureFilter
- SecurityFilter
Concentrating on the latter. The name is "Security". Looks like it supports the following properties:
- namespaceId (GUID) - AKA security namespace
- namespaceToken (string) - securable object token
- permission (int) - bit mask, similar to those in an ACL
- allowSystemContext (optional bool) - ???
- serviceInstanceType (optional GUID) - only matters for VSTS
If you specify a constraint in the manifest JSON under a contribution object, at the very least it propagates through TFS data structures and shows up under VSS.getContribution()
in the extension's script. Now, on to the details of the security check...
ANSWER
Answered 2018-Aug-02 at 02:50Contribution constraints are the answer. Specifically, the "Security" constraint. It performs a permission check against a securable object in TFS, and hides the command if the current user doesn't hold the desired permission.
In my case, I'd use a certain agent pool as a proxy for the "this user is an admin" condition. Internally, role assignments on pools and queues are treated like ACLs. The namespace GUID for pool actions is 101EAE8C-1709-47F9-B228-0E476C35B3BA ("DistributedTask"), the token format is "AgentPools/{PoolID}/". The access mask 27, which corresponds to Use+Administer Permissions+Manage+View
, is the one that corresponds to the pool administrator role.
The constraint is specified in the manifest, under the contribution object:
QUESTION
I have tried to add additional configuration options to an existing VSTS build/release task from the official repository.
To test it, I used the tfs-cli to upload the task to my VSTS account. However, it appears to be broken since the code was based on some newer Vsts Task SDK version that has not yet been published to my VSTS account.
Since I used the same task guid as the official task, I have updated the official one efficiently and left it broken.
How do I revert these changes and get back to the latest official published version of the VSTS build task?
...ANSWER
Answered 2017-Jan-10 at 10:01You can delete the task using tfx build tasks delete
, the baked in version of the task should restore itself. If it doesn't upload it manually using tfx
.
You may be able to find the previous version of the task in the tasks
folder of your build agent if you have a private agent.
QUESTION
My company has a on-premise TFS 2017 instance. I know how to install and update extensions through the web interface, but it's pretty tedious. I'm wondering if there's a quicker way to do it with tfs-cli
.
ANSWER
Answered 2017-Jul-07 at 18:02Took me awhile to figure this out for some reason. At first I thought tfs-cli
could only be used to publish extensions to the Visual Studio Marketplace, but that's not the case. Here's how to do it for on-prem TFS:
You can follow the instructions here. Or:
- Hover over your profile picture in the upper right corner.
- Select "Security".
- Select the "Personal access tokens" section if not already selected.
- Click the "Add" button to generate a new token.
- If you'd like to limit the scope, select just the "Marketplace (publish)" option.
- Click "Create token".
- Copy it and keep it somewhere safe!
Enter the following in the commandline:
tfx login
You'll be prompted to enter the service URL and the personal access token you generated in the last step.
For the service URL, use whatever your company uses to access TFS. Example URLs:
Some things to watch out for:
- Specify http/https.
- You may/may not need to specify the port number.
- Depending on what version of TFS 2017 you're running and how it was installed, you may or may not need to include
/tfs/
in the URL. For example, it's possible to get rid of the/tfs/
virtual directory when installing. Look at the URL you use when you use TFS in your browser and your command accordingly.
- Navigate to the root directory of your extension.
tfx extension create --manifests --rev-version
--manifests
flag is used for specifying the filename of your manifest, e.g.vss-extension.json
--rev-version
flag will automatically increment the patch number of your package.
Use the publish
command to install/update (it'll figure out which needs to be done) your extension.
tfx extension publish --service-url
You need to specify the service URL again here. If you don't, tfx
will attempt to publish your extension to the VSS marketplace.
Lastly, my preferred script:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tfs-cli
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page