diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..46f33fcb --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,79 @@ +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 + - group: FixMyGlass-BuildBranches + +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 + cfDistributionId: $(cfDistributionId) \ No newline at end of file