forked from bbachi/react-nodejs-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (43 loc) · 1.09 KB
/
Jenkinsfile
File metadata and controls
48 lines (43 loc) · 1.09 KB
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
pipeline {
agent any
stages {
stage('test') {
steps {
script {
echo "Testing the application..."
}
}
}
stage('build') {
steps {
script {
echo "Building the application..."
}
}
}
stage('deploy') {
steps {
script {
// Your deploy steps (e.g., pushing to production server)
echo 'Deploying the project...'
sshagent(['ec2-server-key']) {
}
}
}
}
}
post {
always {
// Steps that always run after the pipeline, e.g., cleanup
echo 'Cleaning up...'
}
success {
// Steps to take if the pipeline succeeds
echo 'Pipeline succeeded!'
}
failure {
// Steps to take if the pipeline fails
echo 'Pipeline failed!'
}
}
}