azure-pipelines

Getting the latest image tag from ACR Repository

不羁岁月 提交于 2020-01-22 02:47:05
问题 I need to fetch the latest image tag from Azure Container Registry (ACR) with a bash command in my pipeline and use that tag for container deployment. Here is what I could find with Azure cli: $ az acr repository show-tags --name myacr --repository myrepo --top 1 However this returns me the oldest tag. How can I get the latest pushed tag from ACR repo? 回答1: See this doc: az acr repository show-tags and its parameters description: Order the items in the results. Default to alphabetical order

VSTS Developer Tools Build Tasks Error: Part URI is not valid per rules defined in the Open Packaging Conventions specification

懵懂的女人 提交于 2020-01-17 06:42:30
问题 I'm getting following error when executing VSTS Developer Tools Build Tasks, I have included extension manifest, Please help me to resolve this. error: Failed Request: Bad Request(400) - Part URI is not valid per rules defined in the Open Packaging Conventions specification. tfx failed with error: Error: C:\agent_work_tools\tfx.cmd failed with return code: 4294967295 – <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011"> <Metadata> <Identity Id=

How to break a single command inside a `script` step on multiple lines

余生长醉 提交于 2020-01-16 14:10:02
问题 We have a project using Azure Pipeline, relying on azure-pipelines.yml file at the repo's root. When implementing a script step, it is possible to execute successive commands in the same step simply writing them on different lines: - script: | ls -la pwd echo $VALUE Yet, if we have a single command that is very long, we would like to be able to break it on several lines in the YAML file, but cannot find the corresponding syntax? 回答1: You can use '^' to break your command line into multiple

How to break a single command inside a `script` step on multiple lines

你说的曾经没有我的故事 提交于 2020-01-16 14:09:14
问题 We have a project using Azure Pipeline, relying on azure-pipelines.yml file at the repo's root. When implementing a script step, it is possible to execute successive commands in the same step simply writing them on different lines: - script: | ls -la pwd echo $VALUE Yet, if we have a single command that is very long, we would like to be able to break it on several lines in the YAML file, but cannot find the corresponding syntax? 回答1: You can use '^' to break your command line into multiple

Checkout git submodule in Azure Pipeline with SSH

不羁的心 提交于 2020-01-16 12:35:08
问题 I try to checkout the git submodules via ssh instead of https (default if you use "Checkout submodules") in an Azure DevOps Pipeline. With the option in the picture it works - but for the developers it's annoying to enter the password all the time if they are working with the repository. For that I used the following instructions to add the ssh key. I created a public and a private key, and copied the known_host entry. That's my YAML file snippet: stages: - stage: DeployBackend jobs: - job:

Checkout git submodule in Azure Pipeline with SSH

二次信任 提交于 2020-01-16 12:34:21
问题 I try to checkout the git submodules via ssh instead of https (default if you use "Checkout submodules") in an Azure DevOps Pipeline. With the option in the picture it works - but for the developers it's annoying to enter the password all the time if they are working with the repository. For that I used the following instructions to add the ssh key. I created a public and a private key, and copied the known_host entry. That's my YAML file snippet: stages: - stage: DeployBackend jobs: - job:

Checkout git submodule in Azure Pipeline with SSH

点点圈 提交于 2020-01-16 12:33:50
问题 I try to checkout the git submodules via ssh instead of https (default if you use "Checkout submodules") in an Azure DevOps Pipeline. With the option in the picture it works - but for the developers it's annoying to enter the password all the time if they are working with the repository. For that I used the following instructions to add the ssh key. I created a public and a private key, and copied the known_host entry. That's my YAML file snippet: stages: - stage: DeployBackend jobs: - job:

Why is my Azure Devops Pipeline Artifact locked by another process after download?

那年仲夏 提交于 2020-01-16 12:02:14
问题 I have a very simple release pipeline that only needs to do a few things: Download the artifact to be released. Use the Tokenize In Archive step to replace some configuration values. Deploy Azure App Function The artifact is downloaded as a zip file as I expect. When the pipeline gets to step 2, the Tokenize in Archive step I get an error about another process having the file locked: 2019-12-05T18:46:30.3959242Z ==============================================================================

Integrating Karate with TFS pipeline

故事扮演 提交于 2020-01-16 11:12:09
问题 Build and release system we use is TFS, soon migrating toe Azure Devops. I am trying to introduce an automation framework for contract tests with Karate. Can Karate be integrated with the build jobs in TFS as part of the CI pipeline? 回答1: Karate is a java API test-automation tool that can be implemented using Maven or Gradle. It can be used to run on any CI/CD pipeline using any repository management. Team Foundation Server is both repository management and CD/CD pipeline tools. Please refer

Vnet creation task skip the task if it is run once

时间秒杀一切 提交于 2020-01-16 10:12:14
问题 I am working to build a ci/cd pipeline for AKS. the first task set is "Azure resource group deployment" which is used for creating vnet /subnet for the AKS . The intention is to skip the task next time onwards since the vnet and subnet are already in place. Second time onwards getting the following error - BadRequest: { "error": { "code": "InUseSubnetCannotBeDeleted", "message": "Subnet AKSSubnet is in use by /subscriptions/***************************************/resourceGroups/MC_***********