I can use and install chrome-headless with puppeteer in azure devops by (dev.azure) but its not working in azure devops TFS.
Shows error that "chromium install is failed"
For this issue , if the task you installed is VSTS Chromium Build Task, then this task should not be applicable in TFS.
As stated in the task description: This task automates the Process of Installing Chromium on your Hosted Build Agent in VSTS so that you can run your javascript tests with a headless browser.
However, there is no hosted agent in TFS, only self-hosted agent. So chromium installation will fail . At present, chromium can only installed in azure devops service.
Related
I would like to understand how the tasks work in Azure pipeline, and where can I find the documentation for it.
I have a self-hosted agent where I have installed Terraform, Azure CLI and Azure Powershell.
There are some tasks defined for them, I actually have difficulties to find them in a documentation,for example with terraform, I have to go to azure release and simulate an action of adding task, then convert that in yaml and there I have the task name:
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3#3
displayName: 'Terraform : azurerm'
inputs:
command: custom
customCommand: import
environmentServiceNameAzureRM: 'something'
Also, some tasks asks to install some resources in order to use them, will it affect the resources of my self-hosted agent? for example if we have to install the task before using it ,will it affect somehow the version of my self-hosted terraform?
I have azure powershell installed in the self-hosted agent with an old version, but there is a task that in the version parameter has the latest version, but when executing the task it uses my old version.
How versions for tasks work? Can I use the latest version or az cli without installing it in the self-hosted agent but only with the tasks for the deployments only?
- task: AzurePowerShell#5
displayName: 'DevCode'
inputs:
#azureSubscription: 'something'
azureSubscription: 'something'
ScriptPath: 'something'
azurePowerShellVersion: LatestVersion
The same for az cli.
For the commonly used pipeline tasks published by Microsoft (such as Azure CLI task and Azure PowerShell task), you can find the related documents here.
All these tasks are open-source on the GitHub repository "microsoft/azure-pipelines-tasks".
For the Terraform task, you can find it on Marketplace here and this GitHub repository.
Normally, the tasks would not change the tools have installed on your self-hosted agent machine, also not automatically install the required tools. They just call the required tools have installed on the agent machine.
For example, when you run the Azure CLI task on your self-hosted agent, if you have installed the Azure CLI tool on the agent machine, the task will call the tool to run the specified scripts. If the Azure CLI tool has not installed on the machine, normally the task will go to failure since it cannot find the required Azure CLI tool on the machine.
You do not need to manage the versions of the tasks, you just use the tasks in your pipelines and select the available released versions of the tasks (latest versions are recommended). If a new version of a task is released, you can go to edit your pipelines to use the new version.
Please let me know what are the software's/modules required and installed in the agent to execute the builds in azure devops & teamcity
Will Azure DevOps MS agent will take care of PNP & SharePoint frame work scripts by default?
If it is self hosted agent what are the modules, softwires and packaged need to be installed in the agent machine?
In Azure DevOps we have a Pipeline and Release created and working. In the release, we have the Azure Self-hosted Windows agent running and publishing to the off-site server without any issues.
Once the agent has completed deployment of the website, we would like to run a script on the Self-hosted server. (example POST HOOK COMMAND > C:\srvscripts\azure-post-hook.ps1)
Where can configure the agent to run a script once the website is published?
Where can configure the agent to run a script once the website is published?
If you want to run a script once the website is published on the on the Self-hosted server, you could add a powershell task after the task your deployment the website:
Since you are running the script on the Self-hosted server, we could directly specify the path C:\srvscripts\azure-post-hook.ps1 where the script is located in the scripts path option:
I have a .net application and I am getting below error while running Visual studio task in CI pipeline.
##[error]No agent found in pool TEST APP which satisfies the following demand: visualstudio. All demands: msbuild, visualstudio, Agent.Version -gtVersion 2.115.0
Please let me know how to resolve this.
Your pool does not contain build agents with Visual Studio. You can check your polls and agents on the administration page: Agent pools.
You have to install and register a build agent on a server or virtual machine with visual studio.
Additionally, if your project on Azure DevOps Services, you can use MS Hosted build agents. Update your yaml to:
pool:
vmImage: windows-latest
or if you use classic build, update here:
I saw several pages on Internet but none that explains how to do this.
I have Azure Pipelines, a Windows self-hosted agent and an intranet TFS 2018 Server.
I tried to create a “New Azure Repos/Team Foundation Server” service connection with a full access PAT and got this message: “Failed to query service connection API: 'https: //tfs…/defaultcollection/project/_admin/_services/_apis/projects'. Error Message: 'A task was canceled.'” However, I am not even sure this is what I need.
I want a build pipeline to trigger when developers checks-in in VS2019 for a project in TFS. This pipeline would get the code on the agent, build and create an artifact on Azure Artifacts. A release pipeline would take that artifact and deploy on our intranet servers.
Is that possible?
If yes, could you help me find what must be done in Devops and on the TFS servers?
If not, could you please tell me the best way to do the above?
Many thanks
When you create a "New Azure Repos/Team Foundation Server" service connection, you can try to choose Save without verification.
If you want to check in in VS2019 to trigger a build pipeline, then you need to find the Triggers tab in the build pipeline interface, and then enable continuous integration, add Branch filters.
You can install extension TFS artifacts for Release Management in your organization. With this extension, you can deploy artifacts from external TFS. When you add an artifact, select External TFS build, and then add the required information, you can deploy the artifact to your Internal service
You can get the projectId by calling the REST API below:
REST API : https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=vsts-rest-tfs-4.1
Extension TFS artifacts for Release Management: https://marketplace.visualstudio.com/items?itemName=ms-vscs-rm.vss-services-externaltfs