forked from kafkajs/confluent-schema-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
121 lines (113 loc) · 3.09 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
trigger:
tags:
include:
- 'v*'
branches:
include:
- master
pr:
branches:
include:
- master
variables:
- group: secrets
- name: COMPOSE_FILE
value: docker-compose.yml
jobs:
- job: lint
displayName: Lint
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: yarn install
displayName: yarn install
- bash: yarn lint
displayName: yarn lint
- job: build
displayName: Build
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: yarn install
displayName: yarn install
- bash: yarn build
displayName: yarn build
- job: unit_tests
displayName: Tests
dependsOn: lint
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: yarn install
displayName: yarn install
- bash: docker-compose -f ${COMPOSE_FILE} pull
displayName: docker-compose pull
- bash: yarn test
displayName: integration test with dockest
- job: npm_release
displayName: 'NPM release'
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'))
dependsOn:
- lint
- build
- unit_tests
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: yarn install
displayName: yarn install
- bash: yarn prepare:release
displayName: yarn prepare:release
- task: Npm@1
inputs:
command: custom
customCommand: publish release/ --access public
customEndpoint: npm_registry
publishEndpoint: npm_registry
- bash: TOKEN=${GH_TOKEN} TAG=$(Build.SourceBranch) ./pipeline/updateGithubRelease.js
displayName: github release
env:
GH_TOKEN: $(GH_TOKEN)
- job: website_deploy
displayName: 'Website'
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn:
- lint
- unit_tests
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: git config core.autocrlf true || test true
displayName: git config core.autocrlf
- bash: git config --global user.name "${GH_NAME}" || test true
displayName: git config username
env:
GH_NAME: $(GH_NAME)
- bash: git config --global user.email "${GH_EMAIL}" || test true
displayName: git config email
env:
GH_EMAIL: $(GH_EMAIL)
- bash: echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc || test true
displayName: git config machine
env:
GH_NAME: $(GH_NAME)
GH_TOKEN: $(GH_TOKEN)
- bash: cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages || test true
displayName: publish to gh-pages
env:
GH_NAME: $(GH_NAME)