DigitalConsumer.ISS/azure-pipelines.yml
2022-10-26 14:16:38 -04:00

86 lines
No EOL
2.6 KiB
YAML

trigger:
branches:
include: [ develop, release/* ]
paths:
exclude:
- deployment/*
include:
- "*"
pr:
branches:
include: [ '*' ]
paths:
exclude:
- deployment/*
include:
- "*"
resources:
containers:
- container: node
image: packagerepository.sagaws.net:8082/safelite/node-build:15
- container: awscli
image: packagerepository.sagaws.net:8082/safelite/awscli-build:3.7
repositories:
- repository: AzureDevOps
type: github
name: Safelite/AzureDevOps
endpoint: Safelite
ref: refs/tags/t5.5.19
variables:
- group: Digital-Infrastructure
stages:
# PR's
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- 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
# Dev Build/Deploy
- ${{ else }}:
- stage: Dev
variables:
- group: ISS-dev
jobs:
- deployment: devBuildDeployment
displayName: Build and Deploy ISS - Dev
environment: digitalCloud-dev
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: Dev
- template: templates/digital/step-deploy-vue.yml@AzureDevOps
parameters:
artifactName: vueDistDev
awsProfile: $(devDeploymentProfile)
deployBuckets:
safelite-dev-iss-us-east-2:
clearFolder: true
deployFolder: ''
region: us-east-2
safelite-dev-iss-us-east-1:
clearFolder: true
deployFolder: ''
region: us-east-1
appDeployVariables:
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
cfDistributionId: $(cfDistributionId)