I have a project on https://dev.azure.com
. And I want to setup deploy to my virtual machine from master
branch automatically.
So, I read the this manual and did the following things:
- Create 'Production' environment
- Create new Resource for this environment
- Add new Virtual Machine as a Resource with
VMenv
name - Run registration script on my virtual machine => here my VM was connected to Azure Devops
- Add tag
Production
to this resource - Add the following step to my pipeline:
- deployment: deploy
displayName: Deploy to production
environment:
name: VMenv
resourceType: VirtualMachine
tags: Production
strategy:
runOnce:
deploy:
steps:
- script: echo This is deployment on production
displayName: Deploy project
- And run this pipeline
And when I run this pipeline - it was stuck - here you can find details
Where I made mistake? How I can deploy on my virtual machine via azure devops?