Created
July 8, 2019 14:37
-
-
Save rahulsahay19/23587be637e2b02b8271397c44407681 to your computer and use it in GitHub Desktop.
jam-stack-pipeline.yml
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
# Node.js with Angular | |
# Build a Node.js project that uses Angular. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | |
trigger: | |
- master | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '10.x' | |
displayName: 'Install Node.js' | |
- script: | | |
npm install -g @angular/cli | |
npm install | |
ng build --prod | |
displayName: 'npm install and build' | |
- task: Npm@1 | |
inputs: | |
command: 'custom' | |
workingDir: '$(System.DefaultWorkingDirectory)' | |
customCommand: 'prune --production' | |
displayName: 'Remove extraneous package' | |
- task: ArchiveFiles@2 | |
inputs: | |
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/dist' | |
includeRootFolder: true | |
archiveType: 'zip' | |
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' | |
replaceExistingArchive: true | |
displayName: 'ArchiveFiles' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment