azure-pipelines

How do you cache sdkmanager in AzureDevops?

空扰寡人 提交于 2021-02-11 15:11:29
问题 I do the following in my pipeline - bash: | $ANDROID_SDK_ROOT/tools/bin/sdkmanager 'ndk;20.0.5594570' >/dev/null $ANDROID_SDK_ROOT/tools/bin/sdkmanager 'ndk;21.0.6113669' >/dev/null displayName: "install NDK" Which takes about 3 minutes I was wondering if I can cache this to speed things up. However, I am not sure where it puts the files. 回答1: It seems you want to cache ndk. You may check Pipeline caching: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure

Synchronize Github repository with Azure Devops repository

人走茶凉 提交于 2021-02-11 15:09:11
问题 I am trying to follow the solution given in the following link: How to fix Github to Azure DevOps Sync? My requirement is to trigger Azure Devops pipeline when a commit is done in any branch of GitHub repository. I have already imported the code from GitHub repository using PAT token from GitHub repo. The PAT token is given all access in GitHub repository. But I am getting the following error: Following is my pipeline yaml code: trigger: branches: include: - '*' variables: system_accesstoken:

devops pipeline - use dynamic parameters for job name

非 Y 不嫁゛ 提交于 2021-02-11 14:59:52
问题 I have some code that loop through some values utilising templates. My issue is the jobs all run randomly so I want to create some dependencies, but because they are in a for loop I have not been able to work out how I can name the job steps to then utilise the "dependsOn" option. Also if I tried to hard code a job name I get a duplicate job name error. patch-tasks.yml jobs: - job: '${{ parameters.sqlserver }}_A' displayName: '${{ parameters.sqlserver }}--set-up-stuff' steps: - task:

devops pipeline - use dynamic parameters for job name

元气小坏坏 提交于 2021-02-11 14:58:25
问题 I have some code that loop through some values utilising templates. My issue is the jobs all run randomly so I want to create some dependencies, but because they are in a for loop I have not been able to work out how I can name the job steps to then utilise the "dependsOn" option. Also if I tried to hard code a job name I get a duplicate job name error. patch-tasks.yml jobs: - job: '${{ parameters.sqlserver }}_A' displayName: '${{ parameters.sqlserver }}--set-up-stuff' steps: - task:

What PAT scope to pick in azure devops to get the yaml schema?

安稳与你 提交于 2021-02-11 14:32:53
问题 I'd like to use the following endpoint: https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/yamlschema/get?view=azure-devops-rest-6.0 I.e. https://dev.azure.com/{org}/_apis/distributedtask/yamlschema For that I need to create a PAT with the appropriate access, only the docs do not list which scope I need to enable. 回答1: What PAT scope to pick in azure devops to get the yaml schema? Based on my test , you could grant the Token Administration(Read & manage) or Tokens(Read &

How can I read the PR tag inside a pipeline triggered by another pipeline?

杀马特。学长 韩版系。学妹 提交于 2021-02-11 14:24:06
问题 I had my first question answered here Is it possible to read the PR tag on a pipeline task? but my scenario is a little bit different. I need to read the PR tag from a pipeline that was triggered by another pipeline. PR triggers the CI which checks if everything's ok for merge. If it is, the CI triggers the CD which will in turn read the PR tag. PR -> CI -> CD (access the tag here) I have a PowerShell task named Get PR tag with the following script (courtesy of Lance): $url = "$($env:SYSTEM

How to setup my Az DevOps pipeline to live in a different branch?

最后都变了- 提交于 2021-02-11 14:22:44
问题 I'm setting up Azure DevOps pipeline for CI for a .NET Core 3.0 mvc project. I've created a new branch, DEVOPS , that I would like to store the YAML file in. The file includes a trigger for changes to the master branch: trigger: - master pool: vmImage: 'ubuntu-latest' # other steps/tasks below... I deleted all files except .gitignore and azure-pipelines.yml from the DEVOPS branch, committed it, and pushed it to origin (Az DevOps Repo). I then switched to the master branch, deleted the azure

Why did Microsoft not go with json instead of yml for Azure pipelines?

只谈情不闲聊 提交于 2021-02-11 13:53:07
问题 I am starting to learn Azure dev-ops. You can configure your Azure-pipelines with yml. I was just wondering why did Microsoft go with yml. This could have been done with json as well. Just curious as to why not use a format that is quite popular? 回答1: YAML is not as common as JSON, but it is also a popular and awesome data serialization language. The design goal of JSON is to be simpler and be universally usable. In contrast, the design goal of YAML is to provide a good human-readable format

Run Azure DevOps pipeline via REST API with queue time variables

独自空忆成欢 提交于 2021-02-11 13:32:47
问题 I have Azure DevOps pipeline with set of input variables which supposed to be modified during queue time. According to documentation and this post if values of pipeline variables will be changed during pipeline queue, they cannot be defined in the pipeline YAML definition, but using UI Variables panel and Variables tab in Trigger page. If I am going to trigger my pipeline with Azure DevOps REST API, what is the correct approach to define them or do I need to do this? Should I also use

New Azure DevOps pipeline using ASP.NET yaml template failing

会有一股神秘感。 提交于 2021-02-11 12:55:23
问题 I have a GitHub repository with a .NET Core 3.0 website solution in it. In Azure DevOps, I went through the wizard to create a new pipeline linked to that repository using the ASP.NET Core template on the Configure step of the wizard. This is what my YAML looks like: # ASP.NET Core # Build and test ASP.NET Core projects targeting .NET Core. # Add steps that run tests, create a NuGet package, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: -