Skip to content

Commit 73ff8b4

Browse files
authored
Create Jenkins_jfrog
1 parent 111100b commit 73ff8b4

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Jenkins_jfrog

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pipeline{
2+
agent {label 'build'}
3+
stages{
4+
stage('Git Checkout Stage'){
5+
steps{
6+
git branch: 'main', url: 'https://github.com/Divyamarathi/java-example.git'
7+
}
8+
}
9+
stage('Build Stage'){
10+
steps{
11+
sh 'mvn clean install'
12+
}
13+
}
14+
stage('SonarQube Analysis Stage') {
15+
steps{
16+
withSonarQubeEnv('sonarqube-server') {
17+
sh "mvn clean verify sonar:sonar"
18+
}
19+
}
20+
}
21+
sstage('Push artifacts into artifactory') {
22+
steps {
23+
rtUpload (
24+
serverId: 'jfrog',
25+
spec: '''{
26+
"files": [
27+
{
28+
"pattern": "*.war",
29+
"target": "maven"
30+
}
31+
]
32+
}'''
33+
)
34+
}
35+
}
36+
37+
}
38+
}
39+
40+
}
41+
}

0 commit comments

Comments
 (0)