-
Notifications
You must be signed in to change notification settings - Fork 8
/
nodejs.yml
51 lines (44 loc) · 1.07 KB
/
nodejs.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
atrigger:
- main
variables:
agentPool: 'project-foo'
agentType: 'nodejs'
stages:
- stage: SpinUpAgent
pool:
name: $(agentPool)
demands:
- category -equals init
jobs:
- job: SpinupAgent
displayName: Spining up Agent
steps:
- checkout: none
- script: |
helm repo update
helm install --namespace $(agentPool) --wait $(agentType)-$(Build.BuildId) --set agent.type=$(agentType) zeiss/azdo-demand-agent
displayName: "Create an Agent- HELM"
- stage: Build
pool:
name: $(agentPool)
demands:
- Agent.Name -equals $(agentType)-$(Build.BuildId)
jobs:
- job: NodeJSBuild
steps:
- script: |
npm run install
npm run build
displayName: 'npm install and build'
- stage: DeleteAgent
pool:
name: $(agentPool)
demands:
- category -equals init
jobs:
- job: NodeJSBuild
steps:
- checkout: none
- script: |
helm uninstall --namespace $(agentPool) $(agentType)-$(Build.BuildId)
displayName: "Delete an Agent - HELM"