CMorgan
CMorgan

Reputation: 693

deploy app to on-prem environments with azure dev ops

I'm building an Azure DevOps pipeline to deploy a custom-build powershell application to several on-prem environments that we support. I configured the required agent pools and installed them as a service on the on-prem environment. Next, I have set up my pipeline in Azure DevOps, selecting a GitRepo:

Build (with the steps: Use Nuget, Nuget Restore, Build solution, Update version, Copy Files, and Publish build Artifact)

Release (with step: Publish Build Artifact)

Some things are unclear for me:

What am I missing in my setup to get this pipeline working?

Upvotes: 1

Views: 1023

Answers (2)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30353

As @Shayki Abramczyk pointed out this task is not for deployment, it just upload your Build Artifacts to azure devops server where your release pipeline can download directly.

In your case, if you want deploy your application to several on-prem environments, You need to create a deployment group first, A deployment group is a logical set of deployment target machines that have agents installed on each one. You application will be deployed to those machines in a deployment group in release pipeline. Check here for more details about deployment group.

After the deployment group is created, you can add a deployment group job by click the 3 dots, and then specify your deployment group as below pic shows, You can then simply add a copy file task or other deployment tasks to deploy your application to your on-prem machine.

enter image description here

Upvotes: 3

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41755

In the release pipeline you shouldn't use the Publish Build Artifact. in the end of the build you put this step, what this step does? upload your artifacts to the Azure DevOps or to a file share. now in the release pipeline you choose the build artifact (in the left pane). the first thing that the agent does when the release pipeline started is to download the build artifacts to the agent. now you need to take them and deploy it to your environments. how? it depends which kind of application is (it can be just copy files, it can be deploy to IIS, etc.).

You can put the path in the variables tab and use this variable when you deploy the app (with copy files task, for example).

Upvotes: 1

Related Questions