azure-pipelines-tasks | Tasks for Azure Pipelines | Azure library

 by   microsoft TypeScript Version: v223 License: MIT

kandi X-RAY | azure-pipelines-tasks Summary

kandi X-RAY | azure-pipelines-tasks Summary

azure-pipelines-tasks is a TypeScript library typically used in Cloud, Azure applications. azure-pipelines-tasks has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

This repo contains the tasks that are provided out-of-the-box with Azure Pipelines and Team Foundation Server.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              azure-pipelines-tasks has a medium active ecosystem.
              It has 3262 star(s) with 2531 fork(s). There are 276 watchers for this library.
              There were 3 major release(s) in the last 12 months.
              There are 432 open issues and 7188 have been closed. On average issues are closed in 244 days. There are 129 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of azure-pipelines-tasks is v223

            kandi-Quality Quality

              azure-pipelines-tasks has 0 bugs and 0 code smells.

            kandi-Security Security

              azure-pipelines-tasks has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              azure-pipelines-tasks code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              azure-pipelines-tasks is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              azure-pipelines-tasks releases are available to install and integrate.
              It has 3033 lines of code, 10 functions and 1694 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-pipelines-tasks
            Get all kandi verified functions for this library.

            azure-pipelines-tasks Key Features

            No Key Features are available at this moment for azure-pipelines-tasks.

            azure-pipelines-tasks Examples and Code Snippets

            No Code Snippets are available at this moment for azure-pipelines-tasks.

            Community Discussions

            QUESTION

            Azure devops appsettings.json variable substitution from Key Vault in pipelines not working
            Asked 2022-Mar-22 at 09:54

            I have a .Net 6 web application that I am building in devops. I am trying to substitute settings in the appsettings.json, but somehow can't get it working.

            What I have:

            1. Azure Key vault set up, with a secret with the name: Configuration--ConnectionStrings--ConnectionString
            2. Pipelines have access to this Key Vault with a Variable Group
            3. I have tried the transform task in both build and release pipeline
            4. I have tried the option in the IIS Web app deploy task for substitution

            1 - All is fine

            2 - All is fine

            3 - I have tried this task in build and release with the following configuration:

            ...

            ANSWER

            Answered 2022-Mar-22 at 09:54

            I ended up solving it by creating variables in the pipelines and using the Key Vault secrets as the value. You have to use the dot notation like so:

            Name of var:

            Source https://stackoverflow.com/questions/71510704

            QUESTION

            In the Azure Pipelines PublishSymbols task, how to specify multiple search patterns?
            Asked 2022-Mar-03 at 02:41

            We have the following PublishSymbols task in our pipeline, and it's working correctly.

            ...

            ANSWER

            Answered 2022-Mar-03 at 02:41

            In the Azure Pipelines PublishSymbols task, how to specify multiple search patterns?

            You could specify multiple search patterns directly with newlines:

            Source https://stackoverflow.com/questions/71325906

            QUESTION

            Azure devops: How to distinguish between Microsoft and Self hosted agents
            Asked 2022-Jan-10 at 09:44

            To know if you are on CI of working locally you can use TF_BUILD, but I could not see any environment variable that helps me discern between a self-hosted and a microsoft-hosted agent.

            How can you do that, without having to manually define a custom environemnt variable in our self-hosted machines?

            Update: why do I need this? There are things that work in one way or another depending if it is ms-hosted or self-hosted. e.g. python virtual environements see microsoft/azure-pipelines-tasks Issue 15417.

            ...

            ANSWER

            Answered 2022-Jan-10 at 09:44

            How about using Agent.Name? It is a predefined variable, which has:

            The name of the agent that is registered with the pool.
            If you are using a self-hosted agent, then this name is specified by you. See agents.

            Assuming your naming scheme allows you to tell the difference between your own agents and MS hosted agents, that should do the job?

            Source https://stackoverflow.com/questions/70649011

            QUESTION

            How to restore NuGet package in Azure Pipeline?
            Asked 2021-Nov-23 at 07:09

            I am new to Azure DevOps and trying to create my first Azure pipeline. I have a ASP.NET MVC project and there are a few NuGet packages that need to be restored before the MSBuild step.

            Unfortunately, the NuGet restore is failing with the following error:

            The pipeline is not valid. Job Job_1: Step 'NuGetCommand' references task 'NuGetCommand' at version '2.194.0' contains an execution handler that relies on NodeJS version '6' which is restricted by your administrator.

            NodeJS 6 came disabled out of the box so we are not going to enable it.

            My Questions:

            1. Is there an alternative to NuGet restore that does not use NodeJS?
            2. Is there a way to update the NodeJS6 to a higher version?

            update 23-Nov-2021

            I have found a work around for the time being. I am using a custom PowerShell script to restore NuGet Packages and build Visual Studio project

            ...

            ANSWER

            Answered 2021-Nov-18 at 14:25

            It's AzureDevOps' NuGetCommand task that uses NodeJS, not NuGet itself. Therefore, you can find a way to restore without using Azure DevOps' NuGetCommand task.

            Idea 1: use DotnetCoreCli task instead. However, this probably won't work for you since you said your project is ASP.NET MVC, rather than ASP.NET Core. Also, it also appears to need NodeJS to run.

            Idea 2: Use MSBuild restore. You can test on your local machine whether or not this works by clearing your global packages folder, or temporarily configuring NuGet to use a different path, and then running msbuild -t:restore My.sln from a Developer PowerShell For Visual Studio prompt. If your project uses packages.config, rather than PackageReference, you'll need to also pass -p:RestorePackagesConfig=true (although maybe this is currently broken). I'm not an expert on Azure Pipelines tasks, so I don't know what it means that this task defines both PowerShell and Node execution entry points, but maybe it means it will work even if your CI agent doesn't allow NodeJS.

            Idea 3: Don't use any of the built-in tasks, just use - script: or - task: PowerShell@2, but even that is a little questionable whether it'll work since even the powershell task defines a Node execution entry point. I'm guessing it will work, but I don't have access to a CI agent where NodeJS is forbidden, so I couldn't test even if I wanted to. Anyway, if this works, then you can run MSBuild yourself (but it might also be your responsibility to find msbuild.exe if it's not on the path). Or you can download nuget.exe yourself and execute it in your script. The point is, if you can get Azure Pipeline's script task working, you can run any script and do everything you need yourself.

            Idea 4: Use Microsoft Hosted agents. They have documented all the software they pre-install on the machines, which includes Node JS. Downside is that once you exceed the free quota it costs money, and I've worked for companies where it's easier to get money to buy hardware once-off, and pretend that maintenance of the server is free, even though it reduces team productivity, rather than pay for a monthly service. So, I'll totally understand if this is not an option for you.

            Idea 5: Talk to whoever maintains your CI agents and convince them to allow & install NodeJS. It's clearly a fundamental part of Azure Pipelines. The tasks are open source on github, and you can see that pretty much all of them use NodeJS to orchestrate whatever work it does. Frankly, I thought the agent software itself was a NodeJS application, so I'm surprised that it runs without NodeJS.

            Source https://stackoverflow.com/questions/70021158

            QUESTION

            Azure DevOps gradle build fails
            Asked 2021-Nov-15 at 12:55

            I am trying to migrate my pipeline from Appcenter to DevOps since I need to leverage some of the build-runtime tools.

            The Appcenter builds are working fine, and I can run the app in the phone. But when I create a new pipeline in DevOps with a gradle task, the build fails with this following error:

            ...

            ANSWER

            Answered 2021-Nov-15 at 12:55

            Found out that the error was I did not point to the correct build artifact. Pointed to some old artifact that was not correct. Had to check the location where pipeline was building and point to that directory instead.

            Source https://stackoverflow.com/questions/69769374

            QUESTION

            Azure devops pipeline terraform error - 403 when attempting role assignment
            Asked 2021-Nov-03 at 19:32

            I'm attempting to deploy an aks cluster and role assignment for the system assigned managed identity that is created via terraform but I'm getting a 403 response

            ...

            ANSWER

            Answered 2021-Nov-03 at 19:32

            The Service Principal in AAD associated with the your ADO Service Connection ('Matt Local Service Connection') will need to be assigned the Owner role at the scope of the resource, or above (depending on where else you will be assigning permissions). You can read details about the various roles here the two most commonly used roles are Owner and Contributor, the key difference being that Owner allows for managing role assignments.

            As part of this piece of work, you should also familiarize yourself with the principle of least privilege (if you do not already know about it). How it would apply in this case would be; if the Service Principal only needs Owner at the Resource level, then don't assign it Owner at the Resource Group or Subscription Level just because that is more convenient, you can always update the scope later on but it is much harder to undo any damage (assuming a malicious or inexperienced actor) on overly permissive role assignment after it has been exploited.

            Source https://stackoverflow.com/questions/69829349

            QUESTION

            How to re-deploy Azure Resources using AzDevOps Pipeline?
            Asked 2021-Nov-01 at 11:45

            I have some azure resources (Function App, Cosmos etc) that I have successfully deployed in a resource group using terraform init-plan-apply in a Azure Devops Pipeline. From my local CLI I can change the resources in the main.tf and redeploy, presumably because I have the tf state locally. However, when I try to redploy using the pipeline I get the usual error

            Error: A resource with the ID "/subscriptions/xxxxxx-xxxx-xxxx-xxxx/resourceGroups/my -rg" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_resource_group" for more information. │

            When I try to import using the config described here I get the unhelpful error

            ##[error]Error: There was an error when attempting to execute the process '/usr/local/bin/terraform'. This may indicate the process failed to start. Error: spawn /usr/local/bin/terraform ENOENT

            Am I thinking about pipelines with terraform in the correct way? Should I be trying to import the resource group, or is there a better way to redeploy resources using terraform?

            ...

            ANSWER

            Answered 2021-Nov-01 at 11:45

            You're right, the tf state is not saved on the Azure DevOps agents.

            Common way is to use Azure Storage account to save the tf state.

            You can find official Microsoft tutorial about it here.

            More guides you can find here, here and here.

            Source https://stackoverflow.com/questions/69795085

            QUESTION

            Azure DevOps Pipeline Dockerfile COPY --from clause
            Asked 2021-Aug-26 at 22:23
            Problem

            Working with Azure DevOps, we use a Dockerfile to build and statically serve an Angular application:

            Dockerfile ...

            ANSWER

            Answered 2021-Aug-26 at 22:23

            Came across this question while searching for an answer to the same issue. I have spent the last few hours digging through source code for the Docker task and I think I can answer your questions.

            It appears that the Docker task tries to parse the Dockerfile to determine the base image, and there is (was) a bug in the task that it was looking for lines with FROM in them, but was incorrectly parsing the --from from the COPY --from line.

            It then passes that base image to docker pull and docker inspect prior to calling docker build. The first two commands fail because they're being passed garbage, but the third (docker build) reads the dockerfile correctly and does a pull anyway, so it succeeds.

            It looks like this was fixed on 2021-08-17 to only parse lines that start with FROM, so I assume it will make it to DevOps agents soon.

            Source https://stackoverflow.com/questions/68632842

            QUESTION

            Success criteria on InvokeRESTAPI task throwing exception
            Asked 2021-Aug-24 at 03:19

            On my InvokeRESTAPI task I have opted to use the successCriteria option as follows:

            successCriteria: eq(root["status"], "successful")

            It does not seem to be correct and for the response shown, it throws an exception.

            ...

            ANSWER

            Answered 2021-Aug-24 at 03:19

            You can use single quotes to replace double quotes.

            For example:

            Source https://stackoverflow.com/questions/68899445

            QUESTION

            Azure DevOps Pipeline Terraform Init fail
            Asked 2021-Jul-01 at 17:39

            I am currently stuck at the init point in the Azure DevOps Pipeline. So I successfully install Terraform, but in the next step it already fails.

            ...

            ANSWER

            Answered 2021-Jun-18 at 13:58

            Please make sure you have correct working directory. The message is misleading. The issue is in fact becuase terraform cannot find your tf files.

            Please add this step to check if you have correct directory

            Source https://stackoverflow.com/questions/68032778

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install azure-pipelines-tasks

            You can download it from GitHub.

            Support

            This project welcomes contributions and suggestions. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/microsoft/azure-pipelines-tasks.git

          • CLI

            gh repo clone microsoft/azure-pipelines-tasks

          • sshUrl

            git@github.com:microsoft/azure-pipelines-tasks.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Azure Libraries

            Try Top Libraries by microsoft

            vscode

            by microsoftTypeScript

            PowerToys

            by microsoftC#

            TypeScript

            by microsoftTypeScript

            terminal

            by microsoftC++

            Web-Dev-For-Beginners

            by microsoftJavaScript