-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Jenkinsfile
59 lines (57 loc) · 1.37 KB
/
Jenkinsfile
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
49
50
51
52
53
54
55
56
57
58
59
pipeline{
agent {
label 'MVN3'
}
stages{
stage('clone'){
steps{
git url: 'https://github.com/tarunkumarpendem/shopizer.git',
branch: 'master'
}
}
stage ('build') {
steps {
sh 'mvn clean package'
}
}
stage('Build the Code') {
steps {
withSonarQubeEnv('sonarcloud') {
sh script: 'mvn clean package sonar:sonar'
}
}
stage('archiving-artifacts'){
steps{
archiveArtifacts artifacts: '**/target/*.jar', followSymlinks: false
}
}
stage('junit_reports'){
steps{
junit '**/surefire-reports/*.xml'
}
}
}
pipeline {
agent {label 'OPENJDK-11-JDK'}
triggers {
pollSCM('0 17 * * *')
}
stages {
stage('vcs') {
steps {
git branch: 'release', url: 'https://github.com/longflewtinku/shopizer.git'
}
}
stage('merge') {
steps {
sh 'git checkout devops'
sh 'git merge release --no-ff'
}
}
stage('build') {
steps {
sh 'mvn clean install'
}
}
}
}