-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
47 lines (37 loc) · 911 Bytes
/
Jenkinsfile
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
#!groovy
node {
// Mark the code checkout 'stage'....
stage 'Stage Checkout'
// Checkout code from repository and update any submodules
checkout scm
stage 'Stage Build'
sh 'npm install'
sh 'npm test'
sh 'npm run package'
}
stage 'Deploy test'
timeout(time: 1, unit: 'DAYS') {
input 'Do you want to install on test?'
}
node {
sh 'echo deploying on test'
ansiblePlaybook(
playbook: 'provisioning/playbook.yml',
inventory: 'provisioning/test.inventory ',
extras: '-u admin',
credentialsId: 'bec43108-1819-465a-bf56-91324f852fc1'
)
}
stage 'Deploy prod'
timeout(time: 1, unit: 'DAYS') {
input 'Do you want to install on prod?'
}
node {
sh 'echo deploying on prod'
ansiblePlaybook(
playbook: 'provisioning/playbook.yml',
inventory: 'provisioning/prod.inventory ',
extras: '-u admin',
credentialsId: 'bec43108-1819-465a-bf56-91324f852fc1'
)
}