-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile-cop-plugin
More file actions
34 lines (33 loc) · 1.02 KB
/
Jenkinsfile-cop-plugin
File metadata and controls
34 lines (33 loc) · 1.02 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
def GIT_REPO = 'https://github.com/chuckaude/hello-java.git'
def BRANCH = 'main'
def PROJECT = 'chuckaude-hello-java'
def BLDCMD = 'mvn -B package -DskipTests'
pipeline {
agent { label 'linux64' }
tools {
maven 'maven-3.9'
jdk 'openjdk-17'
}
stages {
stage('checkout') {
steps {
cleanWs()
git url: "$GIT_REPO", branch: "$BRANCH", credentialsId: 'github-chuckaude'
}
}
stage('polaris') {
steps {
polaris arguments: "--co project.name=$PROJECT --co capture.build.cleanCommands='null' analyze -w -- $BLDCMD", polarisCli: 'default'
script {
count = polarisIssueCheck jobTimeoutInMinutes: 30, returnIssueCount: true
}
}
}
}
post {
always {
archiveArtifacts artifacts: '.synopsys/polaris/configuration/synopsys.yml, .synopsys/polaris/data/coverity/*/idir/build-log.txt'
cleanWs()
}
}
}