Skip to content

Instantly share code, notes, and snippets.

@jsheridanwells
Last active October 18, 2018 18:56
Show Gist options
  • Save jsheridanwells/ef2f0699c83d1ef6f1e161706a165705 to your computer and use it in GitHub Desktop.
Save jsheridanwells/ef2f0699c83d1ef6f1e161706a165705 to your computer and use it in GitHub Desktop.
Deploying_to_on-prem-in-AzureDevOps

Deploying_to_on-prem-in-AzureDevOps

desde aqui e tambem aqui

Set Up Build

An ASP.NET template works -

  • Use NuGet
  • NuGet Restore
  • Build solutions
  • Test Assemblies
  • Copy dacpac (This is added)
  • Publish symbols path
  • Publish artifact

Deployment Groups

VSTS -> Deployment Groups -> New -> Then it generates script to build and configure on server

The script will ask you 1. tags? 2/ What user do you want to run under?

VSTS -> Releases:

Phase 1: IIS Deployment and Phase 2: DB Deployment

Database Changes

VSTS SSDT Project encapsulates your database schema

This can be checked into source control.

To Build:

In VSTS, it will build automatically with ASP.NET build task, the artifact will be dacpac

dacpac must be copied to release folder (as a copy task)

To Release:

Use SQL Server DB Deploy Task - this will do schema compare, and generate scripts to update DB on server

It won't let you destroy data when automated

It uses SqlPackage.exe under the hood. You can add any of these commands in Additional Arguments.

eg.

/p:BlockOnPossibleDataLoss=False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment