forked from tahararib/maven-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjenkinsfile11
More file actions
44 lines (41 loc) · 1.19 KB
/
jenkinsfile11
File metadata and controls
44 lines (41 loc) · 1.19 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
pipeline {
agent any
stages {
stage('Clone codebase') {
steps {
echo 'Clone codebase from github'
git (url : 'https://github.com/tahararib/maven-project.git',
branch: 'master', credentialsId: 'cred4github')
}
}
stage('Compile & Test') {
steps {
echo 'Compiling and Testing'
withMaven(maven : 'localMAVEN') {
sh 'mvn clean test'
}
}
}
stage('Build') {
steps {
echo 'Building project'
withMaven(maven : 'localMAVEN') {
sh 'mvn -B -DskipTests clean package'
}
}
}
stage('SonarQube Analysis') {
steps {
echo 'Qualimetry Analysis with SinarQube'
withSonarQubeEnv(installationName : 'sonarServer' , credentialsId: 'cred4sonar') {
sh 'mvn sonar:sonar'
}
}
}
stage('Archive & Deploy') {
steps {
echo 'Archinving Artefact and Deploying App'
}
}
}
}