Merge pull request #793 from Safelite/feature/prettier
Added CloudFront Invalidate and Format Check
This commit is contained in:
commit
3621f4ade0
1 changed files with 44 additions and 16 deletions
|
|
@ -20,13 +20,15 @@ resources:
|
||||||
- container: node
|
- container: node
|
||||||
image: packagerepository.sagaws.net:8082/safelite/node-build:15
|
image: packagerepository.sagaws.net:8082/safelite/node-build:15
|
||||||
- container: awscli
|
- container: awscli
|
||||||
image: packagerepository.sagaws.net:8082/safelite/awscli-build:3.7
|
image: packagerepository.sagaws.net:8082/safelite/awscli2-build:3.9
|
||||||
|
- container: prettier-node
|
||||||
|
image: packagerepository.sagaws.net:8082/safelite/prettier-node-build:18
|
||||||
repositories:
|
repositories:
|
||||||
- repository: AzureDevOps
|
- repository: AzureDevOps
|
||||||
type: github
|
type: github
|
||||||
name: Safelite/AzureDevOps
|
name: Safelite/AzureDevOps
|
||||||
endpoint: Safelite
|
endpoint: Safelite
|
||||||
ref: refs/tags/t5.5.31
|
ref: refs/tags/t5.5.35
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- group: Digital-Infrastructure
|
- group: Digital-Infrastructure
|
||||||
|
|
@ -35,17 +37,25 @@ variables:
|
||||||
stages:
|
stages:
|
||||||
# PR's
|
# PR's
|
||||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
- stage: TestPr
|
- stage: TestFormat
|
||||||
displayName: Run Unit Tests For PullRequest
|
displayName: Test Code Format
|
||||||
jobs:
|
jobs:
|
||||||
- template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps
|
- job: checkFormatting
|
||||||
parameters:
|
displayName: Check formatting
|
||||||
nodeContainer: node
|
container: prettier-node
|
||||||
npmLocation: $(Build.SourcesDirectory)
|
steps:
|
||||||
testResultsFile: junit.xml
|
- bash: prettier --check "$(Build.SourcesDirectory)/src/**/*.(js|vue)"
|
||||||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
displayName: Run Prettier check
|
||||||
|
|
||||||
|
- stage: TestPr
|
||||||
|
displayName: Run Unit Tests For PullRequest
|
||||||
|
jobs:
|
||||||
|
- template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
nodeContainer: node
|
||||||
|
npmLocation: $(Build.SourcesDirectory)
|
||||||
|
testResultsFile: junit.xml
|
||||||
|
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
||||||
- ${{ else }}:
|
- ${{ else }}:
|
||||||
# Dev Build/Deploy
|
# Dev Build/Deploy
|
||||||
- stage: Dev
|
- stage: Dev
|
||||||
|
|
@ -91,7 +101,13 @@ stages:
|
||||||
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: $(vueCfDistributionId)
|
||||||
|
- template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
awsCliContainer: awscli
|
||||||
|
distributionId: $(apiCfDistributionId)
|
||||||
|
paths: /fmg/*
|
||||||
|
awsProfile: $(devDeploymentProfile)
|
||||||
|
|
||||||
# QA Build/Deploy
|
# QA Build/Deploy
|
||||||
- stage: Qa
|
- stage: Qa
|
||||||
|
|
@ -137,7 +153,13 @@ stages:
|
||||||
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: $(vueCfDistributionId)
|
||||||
|
- template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
awsCliContainer: awscli
|
||||||
|
distributionId: $(apiCfDistributionId)
|
||||||
|
paths: /fmg/*
|
||||||
|
awsProfile: $(qaDeploymentProfile)
|
||||||
|
|
||||||
# Prod Build/Deploy
|
# Prod Build/Deploy
|
||||||
- stage: Prod
|
- stage: Prod
|
||||||
|
|
@ -183,7 +205,13 @@ stages:
|
||||||
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: $(apiCfDistributionId)
|
||||||
|
- template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps
|
||||||
|
parameters:
|
||||||
|
awsCliContainer: awscli
|
||||||
|
distributionId: $(apiCfDistributionId)
|
||||||
|
paths: /fmg/*
|
||||||
|
awsProfile: $(prodDeploymentProfile)
|
||||||
- template: templates/digital/auto-tag.yml@AzureDevOps
|
- template: templates/digital/auto-tag.yml@AzureDevOps
|
||||||
parameters:
|
parameters:
|
||||||
dependsOn: prodBuildDeployment
|
dependsOn: prodBuildDeployment
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue