forked from saikiran-private/java-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile2agents4stages
More file actions
37 lines (33 loc) · 948 Bytes
/
Jenkinsfile2agents4stages
File metadata and controls
37 lines (33 loc) · 948 Bytes
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
pipeline {
agent none
stages {
stage('Stage 1 - main') {
agent { label 'Agent1' }
steps {
echo 'Running Stage 1: Build'
sh 'echo "Building the repository"'
}
}
stage('Stage 2 - dev') {
agent { label 'Agent2' }
steps {
echo 'Running Stage 2: Developement'
sh 'echo "Running the developements"'
}
}
stage('Stage 3 - Test') {
agent { label 'Agent2' }
steps {
echo 'Running Stage 3: Testing'
sh 'echo "Testing the application"'
}
}
stage('Stage 4 - prod') {
agent { label 'Agent2' }
steps {
echo 'Running Stage 4: Production'
sh 'echo "Deploying to the production enviroment"'
}
}
}
}