-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile_node_microservice
63 lines (61 loc) · 1.24 KB
/
Jenkinsfile_node_microservice
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
pipeline {
agent any
triggers {
pollSCM('*/1 * * * *')
}
stages {
stage('build') {
steps {
echo "Building node application"
}
}
stage('deploy-dev') {
steps {
script{
deploy("dev")
}
}
}
stage('test-dev') {
steps {
script{
test("dev")
}
}
}
stage('deploy-int') {
steps {
script{
deploy("int")
}
}
}
stage('test-int') {
steps {
script{
test("dev")
}
}
}
stage('deploy-prd') {
steps {
script{
deploy("prd")
}
}
}
stage('test-prd') {
steps {
script{
test("dev")
}
}
}
}
}
def deploy(String environment){
echo "Deployment to ${environment} triggered.."
}
def test(String environment){
echo "Running tests to ${environment}.."
}