2019-04-01 18:28:01 +00:00
|
|
|
trigger:
|
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- production-*
|
2019-04-01 19:33:20 +00:00
|
|
|
|
2019-04-01 18:28:01 +00:00
|
|
|
pr: none
|
|
|
|
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
demands: npm
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
2019-04-01 19:33:20 +00:00
|
|
|
displayName: Use Node 10.x
|
2019-04-01 18:28:01 +00:00
|
|
|
inputs:
|
|
|
|
versionSpec: 10.x
|
|
|
|
|
|
|
|
- script: npm ci
|
2019-04-01 19:33:20 +00:00
|
|
|
displayName: Install npm dependencies
|
2019-04-01 18:28:01 +00:00
|
|
|
|
|
|
|
- script: npm run build
|
2019-04-01 19:33:20 +00:00
|
|
|
displayName: Build the client
|
2019-04-01 18:28:01 +00:00
|
|
|
workingDirectory: client
|
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
LOCALE: $(LOCALE)
|
|
|
|
NEWS_LOCATION: $(NEWS_LOCATION)
|
|
|
|
API_LOCATION: $(API_LOCATION)
|
|
|
|
FORUM_LOCATION: $(FORUM_LOCATION)
|
|
|
|
ROLLBAR_CLIENT_ID: $(ROLLBAR_CLIENT_ID)
|
|
|
|
STRIPE_PUBLIC_KEY: $(STRIPE_PUBLIC_KEY)
|
2019-04-01 18:52:42 +00:00
|
|
|
|
2019-04-01 19:33:20 +00:00
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: Create archive file
|
2019-04-01 18:52:42 +00:00
|
|
|
inputs:
|
2019-04-01 19:33:20 +00:00
|
|
|
rootFolderOrFile: '$(Agent.BuildDirectory)/s/client/public'
|
|
|
|
includeRootFolder: false
|
|
|
|
archiveType: 'zip'
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
|
|
|
|
replaceExistingArchive: true
|
2019-04-01 18:52:42 +00:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
2019-04-01 19:33:20 +00:00
|
|
|
displayName: Publish archive file
|
2019-04-01 18:52:42 +00:00
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
2019-04-01 19:33:20 +00:00
|
|
|
artifactName: build-archive
|