azure-pipelines

Dependent job getting value from a previous stage

半腔热情 提交于 2021-02-08 07:29:42
问题 I have a pipeline that runs two stages. The stages are essentially identical, except one depends on the other. They both reference a template that contains two jobs, one job depending on the other. The first job creates an output variable and the second job consumes it. The problem is that there are two JobA's and two JobB's and JobB doesn't seem to know which JobA is the correct one. Here's the YAML: # azure-pipelines.yaml stages: - stage: deployQA jobs: - template: stage-template.yaml

Azure DevOps integration in Sentry: Associate commits

北城以北 提交于 2021-02-08 07:25:05
问题 Did someone manage to integrate Azure DevOps in Sentry (sentry.io)? I stuck on "Associate commits with a Release" (see: https://docs.sentry.io/workflow/releases/?platform=browser#associate-commits-with-a-release) I can not figure out a way how I can tell Sentry (by API) which commit ids are associated with a current release/deploy. How can I add a task to the pipeline which will post the commit ids to Sentry API? Or is there some other way to do it? 回答1: In azure devops, the Powershell task

Azure DevOps integration in Sentry: Associate commits

女生的网名这么多〃 提交于 2021-02-08 07:23:43
问题 Did someone manage to integrate Azure DevOps in Sentry (sentry.io)? I stuck on "Associate commits with a Release" (see: https://docs.sentry.io/workflow/releases/?platform=browser#associate-commits-with-a-release) I can not figure out a way how I can tell Sentry (by API) which commit ids are associated with a current release/deploy. How can I add a task to the pipeline which will post the commit ids to Sentry API? Or is there some other way to do it? 回答1: In azure devops, the Powershell task

Setting a date and revision number as variables in tfs 2017

纵然是瞬间 提交于 2021-02-08 06:43:28
问题 I want to create a variable named NugetVersionNumber with the value a date format of $(Date:yyyy.MM.dd)$(Rev:.rr) with the revision at the end. e.g. 2018.8.23.1 How do I set a process variable to construct this format without changing the build.buildnumber variable? 回答1: It's not able to directly use $(Date:yyyy.MM.dd)$(Rev:.rr) as a user-defined variables. (Date:yyyyMMdd) is a token of build number format not a general variable. The only way to do this is setting your build number with (Date

How to run a docker container in Azure pipeline?

老子叫甜甜 提交于 2021-02-08 06:15:31
问题 Azure documentation (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/docker?view=azure-devops) does not specify how to run a docker container in Azure pipeline. We can use the Docker@2 task to build / push docker images but it does not have a command to run a container. By looking at source code of older versions of Docker task I can see there has been a run command, but those are now deprecated and there is no documentation to be found. I also followed the doc: https:/

Protect Azure Pipeline Yaml File from Being Edited

人走茶凉 提交于 2021-02-08 05:36:26
问题 Currently storing our pipeline YAML files in our git repo in Azure Devops - trying to find a way to restrict certain users from editting/accessing the YAML file or even possibly a folder that contains the YAML file. We want to implement additional security to prevent our developers from modifying our YAML files to potential exploit sensitive information or make changes that we don't approve (We have a PR policy in place, but would like additional security measures). Ideally - we could setup a

How to use specific private agent under agent pool without YAML?

半世苍凉 提交于 2021-02-07 13:20:13
问题 I have setup 2 private agents under agent pool but when I run the pipeline I want a specific agent to run the pipeline but its not happening. How to select or where to select specific agent to run the pipeline with YAML configuration. 回答1: You need to specify a demand with your agent name you want. you enter the demand in the yaml after the pool name: pool: name: Private demands: Agent.Name -equals Test More info you can find here. Without YAML the demands exist under the Options tab: Or per

VSTS dotnet Nuget Pack: Is not a valid version string

若如初见. 提交于 2021-02-07 10:36:36
问题 I am trying to create a prerelease build for a .net-standard 2.0 library in VSTS. I have created a build with the following steps dotnet restore version 2 dotnet build version 2 dotnet pack version 2 nuget push version 2 When I use the environment variable (PackageName) as $(Build.BuildNumber)-beta as my pack version. The pack fails with the error BuildName_2018.7.11.1-beta is not a valid version string . I have previously used this environment variable as my pack version in .net-framework

Version (VersionPrefix) not being updated by AzureDev Ops CI build

我的未来我决定 提交于 2021-02-07 09:10:21
问题 I have a Azure DevOps pipeline with a local nuget package to a local artifact repo, and then a push to nuget.org. It however is not updating the version and remains at 1.0.0-{build_ver} in the local azure DevOps project artifacts (whilst version is stuck the build_ver of the package increments as expected), but when it tries to push to nutget it fails as its the same 1.0.0 version and ignores the 1.0.1 in the project file. Any pointers please - how can i get the version defined in the csproj

How to fix Github to Azure DevOps Sync?

≡放荡痞女 提交于 2021-02-07 04:37:40
问题 I have a synchronization between Azure DevOps and Github to sync the Github repo with the repo in Azure Devops. End of last year everything works fine. This year the synchronization do not work anymore. The failure message was fatal: could not read Password for 'https://$(XXXXXXXXXToken)@yyyyyy.visualstudio.com': terminal prompts disabled ' I have forgotten, that the PAT expires on 31.12.2019. So I recreated the pipeline, instead of just changing the expiration date of the PAT. facepalm . My