Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (33 sloc) 1017 Bytes
# Node.js
# Build a general Node.js project with npm.
# 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'
variables:
projectFolder: 'src'
buildOutputFolder: 'public'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
pushd $(projectFolder) && npm install && popd
pushd $(projectFolder) && npm run build && popd
## Copy the client to the staging directory
- task: CopyFiles@2
inputs:
sourceFolder: '$(buildOutputFolder)'
contents: '**/*'
targetFolder: '$(Build.ArtifactStagingDirectory)/drop'
cleanTargetFolder: true
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(buildOutputFolder)'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
You can’t perform that action at this time.