-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode
More file actions
46 lines (44 loc) · 1.25 KB
/
code
File metadata and controls
46 lines (44 loc) · 1.25 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
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building...'
// Add your build command here
sh 'mvn clean install' // For Java projects
// sh 'npm install' // For Node.js projects
}
}
stage('Test') {
steps {
echo 'Testing...'
// Add your test command here
sh 'mvn test' // For Java projects
// sh 'npm test' // For Node.js projects
}
}
stage('Deploy') {
steps {
echo 'Deploying...'
// Add your deployment command here
sh 'scp target/myapp.jar user@server:/path/to/deploy' // Example deploy
}
}
stage('Release') {
steps {
echo 'Releasing...'
// Add release actions (e.g., tag repo or trigger notifications)
sh 'git tag v1.0.0'
sh 'git push origin v1.0.0'
}
}
}
post {
success {
echo 'Pipeline completed successfully!'
}
failure {
echo 'Pipeline failed!'
}
}
}