简体   繁体   中英

Use Service Principal in Azure CLI in VSTS Release Definition

We have a Resource Manager service principal configured through VSTS settings to access an Azure subscription. Everything works wonderfully when we use the Powershell Resource Manager built in tasks. However, we have a build agent that is running on a Mac because it needs to build a Xamarin project.

After Xamarin builds the .ipa we need to upload it to blob storage. We would like to grab the storage access token from Azure using the service principal on every release instead of storing the token ourselves, but we don't have access to Powershell because we're running on a Mac. We can use the Azure CLI, but we need to access the same service principal information that the built in Powershell Azure RM tasks use.

Any ideas?

You can separate the build and upload action into build and release. In the build definition, run the Xamarin build and publish the .ipa file to artifacts with Mac agents, and then in the release definition, upload the artifacts to Azure Blob with Windows agent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM