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:
@@ -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
|
||||
Arquivo executável
+17
@@ -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
|
||||
Referência em uma Nova Issue
Bloquear um usuário