Deploy to both buckets

This commit is contained in:
FrankRua 2022-10-20 10:35:08 -04:00
parent ed29e73b3e
commit a6e0bbde46

View file

@ -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/*
@ -35,144 +35,149 @@ 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 # QA Build/Deploy
- stage: Qa - stage: Qa
condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] ) condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] )
variables: variables:
- group: FixMyGlassQa - group: FixMyGlassQa
jobs: jobs:
- deployment: qaBuildDeployment - deployment: qaBuildDeployment
displayName: Build and Deploy FMG - QA displayName: Build and Deploy FMG - QA
environment: NoApproval-All environment: NoApproval-All
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: Qa
- template: templates/digital/step-deploy-vue.yml@AzureDevOps - template: templates/digital/step-deploy-vue.yml@AzureDevOps
parameters: parameters:
artifactName: vueDistQa artifactName: vueDistQa
awsProfile: $(qaDeploymentProfile) awsProfile: $(qaDeploymentProfile)
outputPath: /fmg/ outputPath: /fmg/
deployBuckets: deployBuckets:
safelite-qa-fmg-us-east-1: safelite-qa-fmg-us-east-1:
clearFolder: true clearFolder: true
deployFolder: '' deployFolder: ""
region: us-east-1 region: us-east-1
appDeployVariables: appDeployVariables:
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
indexDeployVariables: indexDeployVariables:
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __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__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
cfDistributionId: $(cfDistributionId) cfDistributionId: $(cfDistributionId)
# Prod Build/Deploy # Prod Build/Deploy
- stage: Prod - stage: Prod
condition: succeeded('Qa') condition: succeeded('Qa')
variables: variables:
- group: FixMyGlassProd - group: FixMyGlassProd
jobs: jobs:
- deployment: prodBuildDeployment - deployment: prodBuildDeployment
displayName: Build and Deploy FMG - Prod displayName: Build and Deploy FMG - Prod
environment: digitalCloud-prod 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: Prod environment: Prod
- template: templates/digital/step-deploy-vue.yml@AzureDevOps - template: templates/digital/step-deploy-vue.yml@AzureDevOps
parameters: parameters:
artifactName: vueDistProd artifactName: vueDistProd
awsProfile: $(prodDeploymentProfile) awsProfile: $(prodDeploymentProfile)
outputPath: /fmg/ outputPath: /fmg/
deployBuckets: deployBuckets:
safelite-prod-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: appDeployVariables:
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
__VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__)
__VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__) __VUE_APP_HERITAGE_FUNNEL__: $(__VUE_APP_HERITAGE_FUNNEL__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
indexDeployVariables: indexDeployVariables:
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __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__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
cfDistributionId: $(cfDistributionId) cfDistributionId: $(cfDistributionId)
- template: templates/digital/auto-tag.yml@AzureDevOps - template: templates/digital/auto-tag.yml@AzureDevOps
parameters: parameters:
dependsOn: prodBuildDeployment dependsOn: prodBuildDeployment
userName: SafeliteAzureDevops userName: SafeliteAzureDevops
userEmail: githubazuredevops@safelite.com userEmail: githubazuredevops@safelite.com