Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions Jenkinsfile

This file was deleted.

12 changes: 12 additions & 0 deletions Jenkinsfile-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pipeline {
agent { label 'linux' }
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
}
stage('SonarQube Analysis') {
def mvn = tool 'Default Maven';
withSonarQubeEnv() {
sh "${mvn}/bin/mvn clean verify sonar:sonar -Dsonar.projectKey=ajith"
}
}
}
22 changes: 22 additions & 0 deletions Jenkinsfile-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pipeline {
agent { label 'linux' }
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
}
stages {
stage('Scan') {
steps {
withSonarQubeEnv(installationName: 'sq1') {
sh './mvnw clean org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar'
}
}
}
stage("Quality Gate") {
steps {
timeout(time: 2, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}
}
}