feat(CI): Set up CD with Azure Pipelines (#35737)

This commit is contained in:
mrugesh mohapatra
2019-04-01 23:58:01 +05:30
committed by GitHub
parent 6fac1c628a
commit 63f798d0ac
2 changed files with 31 additions and 12 deletions

31
azure-pipelines.yml Normal file
View File

@ -0,0 +1,31 @@
trigger:
batch: true
branches:
include:
- production-*
pr: none
pool:
name: Hosted macOS
demands: npm
steps:
- task: NodeTool@0
displayName: 'Use Node 10.x'
inputs:
versionSpec: 10.x
- script: npm ci
displayName: 'Install npm dependencies'
- script: npm run build
workingDirectory: client
displayName: 'Build the 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)

View File

@ -1,12 +0,0 @@
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "/client"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
publish = "client/public/"
# This will be your default build command
command = "npm run build"
# This is where we will look for your lambda functions
#functions = "project/functions/"