diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3d59f0a..5a881bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,47 +6,98 @@ trigger: - main -pool: - vmImage: 'windows-latest' - variables: solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' -steps: +pool: + vmImage: 'ubuntu-latest' # This default pool will be used for Linux builds -- task: NodeTool@0 - inputs: - versionSource: 'spec' - versionSpec: '20.x' +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: 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' -- 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'