Merge pull request #780 from Safelite/feature/multi-region
Feature/multi region
This commit is contained in:
commit
4c9d3cacca
2 changed files with 154 additions and 141 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
include: [ develop, release/* ]
|
include: [develop, release/*]
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- deployment/*
|
- deployment/*
|
||||||
|
|
@ -8,7 +8,7 @@ trigger:
|
||||||
- "*"
|
- "*"
|
||||||
pr:
|
pr:
|
||||||
branches:
|
branches:
|
||||||
include: [ '*' ]
|
include: ["*"]
|
||||||
paths:
|
paths:
|
||||||
exclude:
|
exclude:
|
||||||
- deployment/*
|
- deployment/*
|
||||||
|
|
@ -26,7 +26,7 @@ resources:
|
||||||
type: github
|
type: github
|
||||||
name: Safelite/AzureDevOps
|
name: Safelite/AzureDevOps
|
||||||
endpoint: Safelite
|
endpoint: Safelite
|
||||||
ref: refs/tags/t5.5.19
|
ref: refs/tags/t5.5.31
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- group: Digital-Infrastructure
|
- group: Digital-Infrastructure
|
||||||
|
|
@ -35,144 +35,157 @@ variables:
|
||||||
stages:
|
stages:
|
||||||
# PR's
|
# PR's
|
||||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
- stage: TestPr
|
- stage: TestPr
|
||||||
displayName: Run Unit Tests For PullRequest
|
displayName: Run Unit Tests For PullRequest
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps
|
- template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps
|
||||||
parameters:
|
parameters:
|
||||||
nodeContainer: node
|
nodeContainer: node
|
||||||
npmLocation: $(Build.SourcesDirectory)
|
npmLocation: $(Build.SourcesDirectory)
|
||||||
testResultsFile: junit.xml
|
testResultsFile: junit.xml
|
||||||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
||||||
|
|
||||||
|
|
||||||
# Dev Build/Deploy
|
|
||||||
- ${{ else }}:
|
- ${{ else }}:
|
||||||
- stage: Dev
|
# Dev Build/Deploy
|
||||||
condition: eq(variables['Build.SourceBranch'], variables['dev-branch'] )
|
- stage: Dev
|
||||||
variables:
|
condition: eq(variables['Build.SourceBranch'], variables['dev-branch'] )
|
||||||
- group: FixMyGlassDev
|
variables:
|
||||||
jobs:
|
- group: FixMyGlassDev
|
||||||
- deployment: devBuildDeployment
|
jobs:
|
||||||
displayName: Build and Deploy FMG - Dev
|
- deployment: devBuildDeployment
|
||||||
environment: digitalCloud-dev
|
displayName: Build and Deploy FMG - Dev
|
||||||
container: node
|
environment: digitalCloud-dev
|
||||||
workspace:
|
container: node
|
||||||
clean: all
|
workspace:
|
||||||
strategy:
|
clean: all
|
||||||
runOnce:
|
strategy:
|
||||||
deploy:
|
runOnce:
|
||||||
steps:
|
deploy:
|
||||||
- checkout: self
|
steps:
|
||||||
clean: true
|
- checkout: self
|
||||||
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
clean: true
|
||||||
parameters:
|
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
||||||
buildOutputDir: dist
|
parameters:
|
||||||
environment: Dev
|
buildOutputDir: dist
|
||||||
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
environment: Dev
|
||||||
parameters:
|
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
||||||
artifactName: vueDistDev
|
parameters:
|
||||||
awsProfile: $(devDeploymentProfile)
|
artifactName: vueDistDev
|
||||||
outputPath: /fmg/
|
awsProfile: $(devDeploymentProfile)
|
||||||
deployBuckets:
|
outputPath: /fmg/
|
||||||
safelite-dev-fmg-us-east-1:
|
deployBuckets:
|
||||||
clearFolder: true
|
safelite-dev-fmg-us-east-1:
|
||||||
deployFolder: ''
|
clearFolder: true
|
||||||
region: us-east-1
|
deployFolder: ""
|
||||||
appDeployVariables:
|
region: us-east-1
|
||||||
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
safelite-dev-fmg-us-east-2:
|
||||||
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
clearFolder: true
|
||||||
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
deployFolder: ""
|
||||||
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
region: us-east-2
|
||||||
indexDeployVariables:
|
appDeployVariables:
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
||||||
cfDistributionId: $(cfDistributionId)
|
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
||||||
|
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
||||||
|
indexDeployVariables:
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
||||||
|
cfDistributionId: $(cfDistributionId)
|
||||||
|
|
||||||
|
# QA Build/Deploy
|
||||||
|
- stage: Qa
|
||||||
|
condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] )
|
||||||
|
variables:
|
||||||
|
- group: FixMyGlassQa
|
||||||
|
jobs:
|
||||||
|
- deployment: qaBuildDeployment
|
||||||
|
displayName: Build and Deploy FMG - QA
|
||||||
|
environment: NoApproval-All
|
||||||
|
container: node
|
||||||
|
workspace:
|
||||||
|
clean: all
|
||||||
|
strategy:
|
||||||
|
runOnce:
|
||||||
|
deploy:
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
clean: true
|
||||||
|
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
buildOutputDir: dist
|
||||||
|
environment: Qa
|
||||||
|
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
artifactName: vueDistQa
|
||||||
|
awsProfile: $(qaDeploymentProfile)
|
||||||
|
outputPath: /fmg/
|
||||||
|
deployBuckets:
|
||||||
|
safelite-qa-fmg-us-east-1:
|
||||||
|
clearFolder: true
|
||||||
|
deployFolder: ""
|
||||||
|
region: us-east-1
|
||||||
|
safelite-qa-fmg-us-east-2:
|
||||||
|
clearFolder: true
|
||||||
|
deployFolder: ""
|
||||||
|
region: us-east-2
|
||||||
|
appDeployVariables:
|
||||||
|
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
||||||
|
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
||||||
|
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
||||||
|
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
||||||
|
indexDeployVariables:
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
||||||
|
cfDistributionId: $(cfDistributionId)
|
||||||
|
|
||||||
# QA Build/Deploy
|
# Prod Build/Deploy
|
||||||
- stage: Qa
|
- stage: Prod
|
||||||
condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] )
|
condition: succeeded('Qa')
|
||||||
variables:
|
variables:
|
||||||
- group: FixMyGlassQa
|
- group: FixMyGlassProd
|
||||||
jobs:
|
jobs:
|
||||||
- deployment: qaBuildDeployment
|
- deployment: prodBuildDeployment
|
||||||
displayName: Build and Deploy FMG - QA
|
displayName: Build and Deploy FMG - Prod
|
||||||
environment: NoApproval-All
|
environment: digitalCloud-prod
|
||||||
container: node
|
container: node
|
||||||
workspace:
|
workspace:
|
||||||
clean: all
|
clean: all
|
||||||
strategy:
|
strategy:
|
||||||
runOnce:
|
runOnce:
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
||||||
parameters:
|
parameters:
|
||||||
buildOutputDir: dist
|
buildOutputDir: dist
|
||||||
environment: Qa
|
environment: Prod
|
||||||
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
||||||
parameters:
|
parameters:
|
||||||
artifactName: vueDistQa
|
artifactName: vueDistProd
|
||||||
awsProfile: $(qaDeploymentProfile)
|
awsProfile: $(prodDeploymentProfile)
|
||||||
outputPath: /fmg/
|
outputPath: /fmg/
|
||||||
deployBuckets:
|
deployBuckets:
|
||||||
safelite-qa-fmg-us-east-1:
|
safelite-prod-fmg-us-east-1:
|
||||||
clearFolder: true
|
clearFolder: true
|
||||||
deployFolder: ''
|
deployFolder: ""
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
appDeployVariables:
|
safelite-prod-fmg-us-east-2:
|
||||||
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
clearFolder: true
|
||||||
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
deployFolder: ""
|
||||||
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
region: us-east-2
|
||||||
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
appDeployVariables:
|
||||||
indexDeployVariables:
|
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
||||||
cfDistributionId: $(cfDistributionId)
|
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
||||||
|
indexDeployVariables:
|
||||||
# Prod Build/Deploy
|
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
||||||
- stage: Prod
|
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
||||||
condition: succeeded('Qa')
|
cfDistributionId: $(cfDistributionId)
|
||||||
variables:
|
- template: templates/digital/auto-tag.yml@AzureDevOps
|
||||||
- group: FixMyGlassProd
|
parameters:
|
||||||
jobs:
|
dependsOn: prodBuildDeployment
|
||||||
- deployment: prodBuildDeployment
|
userName: SafeliteAzureDevops
|
||||||
displayName: Build and Deploy FMG - Prod
|
userEmail: githubazuredevops@safelite.com
|
||||||
environment: digitalCloud-prod
|
|
||||||
container: node
|
|
||||||
workspace:
|
|
||||||
clean: all
|
|
||||||
strategy:
|
|
||||||
runOnce:
|
|
||||||
deploy:
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
clean: true
|
|
||||||
- template: templates/digital/step-build-vue.yml@AzureDevOps
|
|
||||||
parameters:
|
|
||||||
buildOutputDir: dist
|
|
||||||
environment: Prod
|
|
||||||
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
|
|
||||||
parameters:
|
|
||||||
artifactName: vueDistProd
|
|
||||||
awsProfile: $(prodDeploymentProfile)
|
|
||||||
outputPath: /fmg/
|
|
||||||
deployBuckets:
|
|
||||||
safelite-prod-fmg-us-east-1:
|
|
||||||
clearFolder: true
|
|
||||||
deployFolder: ''
|
|
||||||
region: us-east-1
|
|
||||||
appDeployVariables:
|
|
||||||
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
|
||||||
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
|
|
||||||
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
|
|
||||||
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
|
||||||
indexDeployVariables:
|
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
|
||||||
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
|
||||||
cfDistributionId: $(cfDistributionId)
|
|
||||||
- template: templates/digital/auto-tag.yml@AzureDevOps
|
|
||||||
parameters:
|
|
||||||
userName: SafeliteAzureDevops
|
|
||||||
userEmail: githubazuredevops@safelite.com
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
process.env.VUE_APP_CONSUMER_CF_DISTRO =
|
process.env.VUE_APP_CONSUMER_CF_DISTRO =
|
||||||
"https://consumerapidev.safelite.com";
|
"https://digitalapi.dev.safelite.io";
|
||||||
process.env.VUE_APP_HERITAGE_FUNNEL =
|
process.env.VUE_APP_HERITAGE_FUNNEL =
|
||||||
"http://localhost:38000/default.aspx";
|
"http://localhost:38000/default.aspx";
|
||||||
process.env.VUE_APP_GOOGLE_PLACES_API_KEY =
|
process.env.VUE_APP_GOOGLE_PLACES_API_KEY =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue