-
-
Save joewashington75/f99ee810f1b7f6e0325fcb87e499a8a7 to your computer and use it in GitHub Desktop.
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
# Starter pipeline | |
# Start with a minimal pipeline that you can customize to build and deploy your code. | |
# Add steps that build, run tests, deploy, and more: | |
# https://aka.ms/yaml | |
trigger: | |
- master | |
pool: | |
vmImage: 'ubuntu-latest' | |
stages: | |
- stage: Build | |
displayName: Build Angular App and publish artifacts | |
jobs: | |
- job: BuildAngularApp | |
displayName: Build Angular App | |
steps: | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '10.x' | |
displayName: 'Install Node.js' | |
- script: | | |
npm install -g @angular/cli | |
displayName: 'Install the angular cli globally' | |
- task: Npm@1 | |
inputs: | |
command: 'install' | |
workingDir: 'src/multistage-pipeline-demo' | |
displayName: 'Install angular app packages' | |
- task: Npm@1 | |
displayName: 'Build Angular application' | |
inputs: | |
command: custom | |
customCommand: run build -- --prod | |
workingDir: src/multistage-pipeline-demo | |
- task: ArchiveFiles@2 | |
displayName: Zip Angular dist folder | |
inputs: | |
rootFolderOrFile: 'src/multistage-pipeline-demo/dist/multistage-pipeline-demo' | |
includeRootFolder: false | |
archiveType: 'zip' | |
archiveFile: '$(Build.ArtifactStagingDirectory)/multistage-pipeline-demo.zip' | |
replaceExistingArchive: true | |
- task: PublishBuildArtifacts@1 | |
displayName: Publish Angular app dist folder artifact | |
inputs: | |
PathtoPublish: '$(Build.ArtifactStagingDirectory)/multistage-pipeline-demo.zip' | |
ArtifactName: 'angular-app' | |
publishLocation: 'Container' | |
- job: PublishARMArtifacts | |
displayName: Publish ARM artifact | |
steps: | |
- task: PublishBuildArtifacts@1 | |
inputs: | |
PathtoPublish: 'src/MultiStagePipeline/AzureResourceGroup.Infrastructure' | |
ArtifactName: 'arm-template' | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment