From 5008dd1bc81b8c4564c873a6e071786da90441dc Mon Sep 17 00:00:00 2001 From: Jose Jr Aquino Date: Sat, 5 Apr 2025 22:09:53 +0000 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 117 +++++++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 33 deletions(-) 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'