72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
# 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
|
|
|
|
jobs:
|
|
- job: DEV
|
|
pool:
|
|
vmImage: 'windows-2019'
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '8.x'
|
|
displayName: 'Install Node.js'
|
|
|
|
- script: |
|
|
npm i
|
|
displayName: 'Npm install'
|
|
|
|
- script: |
|
|
gulp bundle --ship && gulp package-solution --ship
|
|
displayName: 'Build DEV package'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.SourcesDirectory)\sharepoint\solution\react-app-settings.sppkg'
|
|
artifactName: 'DEV-sppkg'
|
|
displayName: 'Publish DEV env SPFx artifacts'
|
|
|
|
- job: PROD
|
|
pool:
|
|
vmImage: 'Ubuntu-16.04'
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '8.x'
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
sourceFolder: '$(Build.SourcesDirectory)/devops/configurations/PROD'
|
|
contents: '**/*'
|
|
targetFolder: '$(Build.SourcesDirectory)'
|
|
overWrite: true
|
|
|
|
- script: |
|
|
npm i
|
|
displayName: 'Npm install'
|
|
|
|
- script: |
|
|
gulp bundle --ship
|
|
gulp package-solution --ship
|
|
displayName: 'Build PROD package'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.SourcesDirectory)/sharepoint/solution/react-app-settings.sppkg'
|
|
artifactName: 'PROD-sppkg'
|
|
displayName: 'Publish PROD env SPFx artifacts'
|
|
|
|
- job: Release_Scripts
|
|
pool:
|
|
vmImage: 'Ubuntu-16.04'
|
|
steps:
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.SourcesDirectory)/devops/release/'
|
|
artifactName: 'Release-scripts'
|
|
displayName: 'Publish release scripts' |