-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
64 lines (61 loc) · 1.74 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: 'docker run -p 6379:6379 --name redis -d redis'
displayName: 'Start Redis'
- task: Bash@3
inputs:
targetType: 'inline'
script: 'docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_USER=admin -e POSTGRES_DB=kondo --name postgres -d postgres:12'
displayName: 'Start Postgres'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- task: DownloadSecureFile@1
name: envFile
inputs:
secureFile: 'development.env'
- script: |
mv $(envFile.secureFilePath) development.env
displayName: Create development.env
- script: |
yarn install
displayName: 'Yarn Install'
- script: |
yarn test
displayName: 'Jest Testing'
env:
AUTH0_CLIENT_AUDIENCE: $(AUTH0_CLIENT_AUDIENCE)
AUTH0_CLIENT_ID: $(AUTH0_CLIENT_ID)
AUTH0_CLIENT_SECRET: $(AUTH0_CLIENT_SECRET)
- task: Bash@3
inputs:
targetType: 'inline'
script: 'docker stop redis'
displayName: 'Stop Redis'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloud DevOpsLibrary'
organization: 'devopslibrary'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'dl-web-api'
cliProjectName: 'dl-web-api'
cliProjectVersion:
cliSources: '.'
extraProperties: |
sonar.sources=.
sonar.tests=.
sonar.test.inclusions=**/*.spec.ts,**/*.test.ts
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.testExecutionReportPaths=test-report.xml
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
- task: SonarCloudAnalyze@1