-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
44 lines (38 loc) · 1.05 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
/* groovylint-disable-next-line CompileStatic */
pipeline {
agent any
environment{
SONAR_LOGIN = credentials('Sonar_Scan_Token')
}
stages {
/* stage('SCM Checkout') {
steps {
git branch: 'master', url: 'https://github.com/sagarkrp/fakeweb.git'
//sh 'whoami'
}
} */
stage('Gradle Build') {
steps {
sh 'chmod +x gradlew'
sh "./gradlew build"
}
}
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv(installationName: 'SQ_Server'){
sh 'chmod +x gradlew'
sh "./gradlew sonar"
//-Dsonar.token=$SONAR_LOGIN"
}
}
}
stage('Quality Gate') {
steps {
timeout(time: 5, unit: 'MINUTES')
{
waitForQualityGate abortPipeline: true
}
}
}
}
}