Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created July 8, 2019 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/23587be637e2b02b8271397c44407681 to your computer and use it in GitHub Desktop.
Save rahulsahay19/23587be637e2b02b8271397c44407681 to your computer and use it in GitHub Desktop.
jam-stack-pipeline.yml
# 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