Displaying information in an Azure DevOps pipeline summary - azure-devops

I use Azure DeVops pipelines to run my integration tests. The test results are used to generate a report that is copied over to a static site (AWS S3). Each URL for each test run is unique and I am looking for some kind of way to make it easy to get to that URL so the report can be viewed.
Right now I am just using an echo to spit the URL out to the log for the particular agent task that copies out the report, I'd like to figure out some way to make it easier to get to that URL.
Is it possible to add information to the summary screen?
devops pipeline summary screen

According to your description, you could create a real custom summary tab to display customized info.
To achieve this, you need to write an extension by Visual Studio Services Web Extension SDK.
MS team has provided a great sample on github Build Results Enhancer, you can check this sample for some more details.
Hope this helps.

Related

Is it possible to find all objects that are not related in Azure Data Factory?

I have inherited an Azure Data Factory solution in my new job. It has been worked on by at least 6 different BI developers. I'm currently busy with cleaning up my Azure Data Factory, fixing version control, and making sure that all my three environments are the same.
Some objects seem obsolete to me. To check if it is obsolete, I go over to the portal, and check the objects Properties if it is related to another object.
If not, it is a confirmation for me that the object is not (yet) used and I can safely remove it from the solution.
Is there an easier way than checking each object?
I figured it out and wanted to share it here. It is possible to check the "orphaned" objects in an ADF instance, however not directly from the UI. Paul Andrew has an excellent blogpost about his script that is able to check your ADF code against his best practices. The relevant checks for me are:
Pipeline(s) without any triggers attached. Directly or indirectly.
Dataset(s) not used by any other resource.
Trigger(s) not used by any other resource.
Linked Service(s) not used by any other resource.
The last check can also be done via UI, see #AbhishekKhandave-MT answer.
Step 1: Export ARM template to a local folder, and unzip it
Step 2: Download Paul Andrews PowerShell script from here
Step 3: Open the script and replace the $ARMTemplateFilePath variable with the path to your ADF ARM template. If you want to check out the details, change the $VerboseOutput variable to $true
Step 4: Run the script and check the results.
Here are my results, so 58 datasets are not used by any other resource.
Unfortunately, there is no other way to find whether object is used(yet) or not.
But you can check number of datasets linked with a single linked service as shown in below screenshot.
Manage > Linked Services
Click on number in Related column.

Get user ID in Azure Pipelines

Is it possible to access the user ID and use it in an Azure pipelines yaml file? I have looked at the built in variables and it does not seem as though this is included there.
It seems as though the this functionality can be provided by the Build.QueuedById variable (obviously only if the build was triggered manually by someone).
see enter link description here

How to customize Azure DevOps WorkItem Field Microsoft.VSTS.TCM.Steps

I'm looking for a way to add an additional column for test steps in Azure DevOps TestCase WorkItem.
It is possible to add new fields (string / select controls etc) and reorder existing fields on the test case level. But is it possible to customize the Microsoft.VSTS.TCM.Steps Field?
There is no possibility to adapt it in the test case edit view
and the field delete / edit in all fields area is deactivated too
In the self hosted azure devops server 2019 it seems to be possible over tfs power tools / wit export & import. But how to do it in the azure cloud? maybe there is a way over extensions?
It seems you are using XML process model in azure devops server 2019. But in azure devops service, you are using inherited processes model. To customize work item types in inherited processes, please refer to the following link:
https://learn.microsoft.com/en-us/azure/devops/organizations/settings/work/customize-process-wit?view=azure-devops
You can only delete the custom fields, those fields defined for system processes can not be deleted. Steps is a particular field that can not be hide. If you want to customize Steps field, you would need to create a custom work item and customize the Steps field there.

Where to update new PAS token from MS DevOps in my Angular 2+ source code?

I have a Personal Access Token about to expire in DevOps/VSTS, but I can't see it in DevOps to do a ctrl-f and find it in my source code.
I have an Angular 2+ frontend with a .net core api backend.
Which file should I be looking at? Does it need to go in the backend? Or Frontend? Or both?
config.json? project.json? Which property is it (if it is a config file like that)?
Or is it somewhere else I need to update this? Not in source code, but something with the build agent? How would I update that?!
Which file should I be looking at? Does it need to go in the backend?
Since we could not clearly know how is your script look like, I assume you may not remember clearly about this because of huge script files. For this, Azure Devops has a feature Search can search what you want across all your code.
For any repos which with a api called, we suggest you search the code files first with Search feature. And also, you may pass the token value with task variable. So, you also need to check your pipeline variable.

Creating configuration pane for Azure DevOps extension

We have created a few extensions for Azure DevOps (0) that are pipeline extensions.
We are trying to create new extensions that can react to changes in work items of Azure Boards. The API's for interacting with changes in work items are fairly straight-forward, but we are struggling with configuration of the extension.
Essentially we need to allow the users to configure the extension on two levels
1) On "Organization level"
It should be possible for a user (Project Administrator) to configure parameters as "external system URL" etc. An example of this could be something like below mockup:
2) On "Project level"
For each project in Azure DevOps an admin should be able to configure parameters like "Enable/disable extension" or "External UID" etc. An example of this could be something like below mockup:
When the extension reacts to "Work item saved" it will query the parameters on both levels to figure out what to do.
My problem is: where the heck do I save this information? I could add a number of "custom fields" to the template in use, but since fields can only be added to work item types, it is really not ideal in any way.
Where can I save this information through the API's?
PS: Source code for our extensions are available as OSS (Apache license) here:
(0) https://bitbucket.org/projectum/
Thank you :-)
It turns out that Azure DevOps has a way to store data for extensions. It can store data on both Project Collection scope as well as User scope.
I think I will be able to use this to store the data I need. All I need now is to figure out where to put the UI that the user or admin will use to maintain this data.
https://learn.microsoft.com/en-us/azure/devops/extend/develop/data-storage?view=vsts
:-)
For #1, it somewhat looks like what you can configure under a pipeline's service connections. This is per project though and not at an organization level.
This might be easier to manage outside of an extension and instead just use a service hook to call some middle tier that accomplishes what you want.