ci: refactor web deploy pipeline (#702)

* move deploy functionality to release
* replace az storage command with az copy ADO task
Esse commit está contido em:
My
2019-03-22 17:58:38 -04:00
commit de Wallace Breza
commit b58bc5c1a6
3 arquivos alterados com 55 adições e 0 exclusões
+3
Ver Arquivo
@@ -13,3 +13,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.yml]
indent_size = 2
@@ -0,0 +1,35 @@
trigger:
branches:
include:
- dev*
- v2
pr: none # disable CI build for PR
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
displayName: 'Use Node 10.x'
inputs:
versionSpec: 10.x
- task: Npm@1
displayName: 'npm ci'
inputs:
command: custom
workingDir: .
verbose: false
customCommand: ci
- task: Bash@3
displayName: 'Create artifact'
inputs:
targetType: filePath
filePath: './scripts/generate-web-artifact.sh'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: build'
inputs:
PathtoPublish: ./build
ArtifactName: build
+17
Ver Arquivo
@@ -0,0 +1,17 @@
#!/bin/bash
set -euo pipefail
# NOTE: this script should be ran from the root of the repository; the CWD should reflect this
VERSION=$(node -pe "require('./package.json').version")
COMMIT_SHA=$(git rev-parse --short HEAD)
echo "cwd=$(pwd)"
echo "version=${VERSION}"
echo "commit=${COMMIT_SHA}"
# use by web pack
export REACT_APP_VERSION=${VERSION}
export REACT_APP_COMMIT_SHA=${COMMIT_SHA}
# npm install will be in a standalone task
npm run release-web