Questions tagged [azure-pipelines-tasks]

216 questions
0
votes
0 answers

How to pass parameter value of one build pipeline to another build pipeline as a input in azure devops using YAML?

I have a build pipeline which is running with parameter value which is dynamic and once that build pipeline is completed then I should trigger another build pipeline which is in the same project passing input as a parameter from the first…
0
votes
1 answer

How to retrieve Powershell variable across tasks?

I'm trying to set a Powershell variable in an Azure devops pipeline, then retrieve that variable in a subsequent task. But the variable cannot be found. In the first Powershell task I've set the inline script to... Install-Module -Name SqlServer…
awj
  • 7,482
  • 10
  • 66
  • 120
0
votes
1 answer

Azure self-hosted agent kubernetes task fails

I am using Azure self-hosted agents using VMSS, when running Kubernetes@1 task on the agent it returns this error couldn't get current server API group list: Get "https://.hcp.westeurope.azmk8s.io/api?timeout=32s": dial tcp: lookup…
0
votes
1 answer

AzureCLI task in Azure DevOps pipeline cannot find the location of scripts

I am using Azure DevOps pipeline and in one of my tasks I need to run a bash script which contains some Azure CLI scripts. I have put this script in a folder called scripts, and my pipeline is running in pipelines folder. Pipelines and script…
0
votes
1 answer

Finding the right cache for PR build in context of Azure DevOps pipeline caching

I am trying to use the Azure DevOps pipeline caching mechanism like described here https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops but I am struggling to understand how for a PR build the cache is being…
Marko
  • 929
  • 9
  • 27
0
votes
2 answers

What is "main" branch in context of Azure DevOps pipeline caching?

I am trying to use the Azure DevOps pipeline caching mechanism like described here https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops but I am struggling with the term "main branch" that is listed in the…
Marko
  • 929
  • 9
  • 27
0
votes
1 answer

Python Script in Azure pipelines failing with error

I am trying to execute python script using filePath option, though I am passing the correct path the script task is failing with error 'The given path was not to a file', below are the task configuration in yaml & error screen shots, please correct…
0
votes
0 answers

Export Kubernetes pods statistics dynamically using Azuredevops pipelines

I have an azuredevops yaml bash task to query all the pods in my aks cluster and from there I used jq filter to query the pods resource statics etc.. as given below. kubectl get pods -A -o json >all.json jq -r '["Namespace,NodeName, PodName,…
0
votes
1 answer

How do I add a condition to overrideParameters in Azure pipeline task AzureResourceGroupDeployment

Let's say that we have an Azure pipeline task like so: # Azure resource group deployment v2 # Deploy an Azure Resource Manager (ARM) template to a resource group and manage virtual machines. - task: AzureResourceGroupDeployment@2 inputs: …
0
votes
0 answers

How to configure console of azure devops pipeline powershell task to properly format Write-* Cmdlets' output?

I'm using the following PowerShell task: 2022-12-09T04:30:32.5910772Z Task : PowerShell 2022-12-09T04:30:32.5911006Z Description : Run a PowerShell script on Linux, macOS, or Windows 2022-12-09T04:30:32.5911196Z Version :…
successhawk
  • 3,071
  • 3
  • 28
  • 44
0
votes
1 answer

Can't package Azure DevOps Extension, cause a dependency includes a file with spaces in the name

After updating QueryAzureDevOpsExtensionVersion@3 to version 4 and the same for PackageAzureDevOpsExtension, I started getting errors in PackageAzureDevOpsExtension. All errors looked something like that: error: Error: Part Name…
0
votes
1 answer

Installing Java 14 on Azure pipeline for MacOS agent

I need to use Java 14 on a hosted agent (macos-12) and I'm trying to install it through a script and then use the JavaToolInstaller task to make it available. I have modified the script from…
0
votes
1 answer

Conditional steps based on parameter value in template task Azure Pipelines YAML

I have a step where I check if there are changes in a specific folder since the last commit (I set isOutput=true because I need this in another stage later as well): bash: | git checkout origin/$(System.PullRequest.SourceBranch) …
0
votes
2 answers

Where does PublishPipelineArtifact@1 write output? How do I access the files from later stages?

I have 2 stages: build & deploy In the build stage, my publish task looks like: - task: PublishPipelineArtifact@1 inputs: targetPath: $(Build.ArtifactStagingDirectory)/funcabc-1.1.0.zip artifactName: functionapp After running…
0
votes
0 answers

How to encode base64 in an Azure Devops Pipelines extension

I'm developing an Azure Pipelines extension in Typescript following their documentation At some point I need to encode base64 a string. I tried using the btoa() function but the pipeline fails -> ##[error]btoa is not defined async function run() { …
codependent
  • 23,193
  • 31
  • 166
  • 308