diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..4e1d1b6c5 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,77 @@ +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: DigitalConsumer + +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: coverage/cobertura-coverage.xml + + # Dev Build/Deploy + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/develop') }}: + - stage: Dev + variables: + - group: FixMyGlassDev + jobs: + - deployment: devBuildDeployment + displayName: Build and Deploy FMG - 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 + - template: templates/digital/step-deploy-vue.yml@AzureDevOps + parameters: + artifactName: vueDist + awsProfile: $(devDeploymentProfile) + deployBuckets: + safelite-dev-fmg-us-east-2: + clearFolder: true + deployFolder: '' + region: us-east-2 + cfDistributionId: $(cfDistributionId)