104 lines
2.5 KiB
YAML
104 lines
2.5 KiB
YAML
# ASP.NET
|
|
# Build and test ASP.NET projects.
|
|
# Add steps that publish symbols, save build artifacts, deploy, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
|
|
|
|
trigger:
|
|
- main
|
|
|
|
variables:
|
|
solution: '**/*.sln'
|
|
buildPlatform: 'Any CPU'
|
|
buildConfiguration: 'Release'
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-latest' # This default pool will be used for Linux builds
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
- job: LinuxBuild
|
|
displayName: 'Build on Linux'
|
|
pool:
|
|
vmImage: 'ubuntu-latest' # Specify the Linux agent
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSource: 'spec'
|
|
versionSpec: '20.x'
|
|
|
|
- task: Npm@1
|
|
inputs:
|
|
command: 'custom'
|
|
workingDir: 'EnotaryoPH/EnotaryoPH.Web'
|
|
customCommand: 'install --production'
|
|
|
|
- task: PowerShell@2
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
npm install rimraf -g
|
|
npm install parcel -g
|
|
|
|
- task: NuGetCommand@2
|
|
inputs:
|
|
restoreSolution: '$(solution)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'custom'
|
|
custom: 'publish'
|
|
arguments: '-o $(Build.ArtifactStagingDirectory)'
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
ArtifactName: 'drop'
|
|
publishLocation: 'Container'
|
|
|
|
|
|
- job: WindowsBuild
|
|
displayName: 'Build on Windows'
|
|
pool:
|
|
vmImage: 'windows-latest' # Specify the Windows agent
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSource: 'spec'
|
|
versionSpec: '20.x'
|
|
|
|
- task: Npm@1
|
|
inputs:
|
|
command: 'custom'
|
|
workingDir: 'EnotaryoPH/EnotaryoPH.Web'
|
|
customCommand: 'install --production'
|
|
|
|
- task: PowerShell@2
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
npm install rimraf -g
|
|
npm install parcel -g
|
|
|
|
- task: NuGetCommand@2
|
|
inputs:
|
|
restoreSolution: '$(solution)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'custom'
|
|
custom: 'publish'
|
|
arguments: '-o $(Build.ArtifactStagingDirectory)'
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
ArtifactName: 'drop'
|
|
publishLocation: 'Container'
|
|
|
|
|
|
|
|
|