forked from MicrosoftDocs/mslearn-tailspin-spacegame-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update azure-pipelines.yml for Azure Pipelines
- Loading branch information
1 parent
4ac8ded
commit 66d4d28
Showing
1 changed file
with
31 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,45 @@ | ||
# ASP.NET Core (.NET Framework) | ||
# Build and test ASP.NET Core projects targeting the full .NET Framework. | ||
# Add steps that publish symbols, save build artifacts, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | ||
|
||
trigger: | ||
- master | ||
- '*' | ||
|
||
pool: | ||
vmImage: 'windows-latest' | ||
vmImage: 'ubuntu-16.04' | ||
demands: | ||
- npm | ||
|
||
variables: | ||
solution: '**/*.sln' | ||
buildPlatform: 'Any CPU' | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- task: NuGetToolInstaller@1 | ||
- task: UseDotNet@2 | ||
displayName: 'Use .NET Core SDK 3.1.100' | ||
inputs: | ||
packageType: sdk | ||
version: 3.1.100 | ||
|
||
- task: NuGetCommand@2 | ||
- task: Npm@1 | ||
displayName: 'Run npm install' | ||
inputs: | ||
restoreSolution: '$(solution)' | ||
verbose: false | ||
|
||
- script: './node_modules/.bin/node-sass Tailspin.SpaceGame.Web/wwwroot --output Tailspin.SpaceGame.Web/wwwroot' | ||
displayName: 'Compile Sass assets' | ||
|
||
- task: gulp@1 | ||
displayName: 'Run gulp tasks' | ||
|
||
- script: 'echo "$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)" > buildinfo.txt' | ||
displayName: 'Write build info' | ||
workingDirectory: Tailspin.SpaceGame.Web/wwwroot | ||
|
||
- task: VSBuild@1 | ||
- task: DotNetCoreCLI@2 | ||
displayName: 'Restore project dependencies' | ||
inputs: | ||
solution: '$(solution)' | ||
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"' | ||
platform: '$(buildPlatform)' | ||
configuration: '$(buildConfiguration)' | ||
command: 'restore' | ||
projects: '**/*.csproj' | ||
|
||
- task: VSTest@2 | ||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build the project - Release' | ||
inputs: | ||
platform: '$(buildPlatform)' | ||
configuration: '$(buildConfiguration)' | ||
command: 'build' | ||
arguments: '--no-restore --configuration Release' | ||
projects: '**/*.csproj' |