Repository navigation
Expand file tree
/
Copy pathJenkinsfile
More file actions
65 lines (62 loc) · 2.18 KB
/
Copy pathJenkinsfile
File metadata and controls
65 lines (62 loc) · 2.18 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
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
60
61
62
63
64
65
def artifactName = "ppm-jar" // also used for nexus filePath and artifactId attributes
def artifactVersion = "5.${env.BUILD_NUMBER}"
def artifactSemVersion = "${artifactVersion}.0"
def repoName = "ppm-repo"
pipeline {
agent any
stages {
stage('CI') {
steps {
echo 'running CI'
//sh '/usr/local/bin/mvn compile'
//sh '/usr/local/bin/mvn verify'
}
//post {
// always {
// junit '**/target/surefire-reports/*.xml'
//}
//}
}
stage('TestSonarChanges') {
steps {
echo 'TestSonarChanges'
}
/*environment {
SCANNER_HOME = tool 'sonarScanner'
//ORGANIZATION = "igorstojanovski-github"
//PROJECT_NAME = "igorstojanovski_jenkins-pipeline-as-code"
}
steps {
echo 'TestSonarChanges'
//sh 'def scannerHome = tool 'SonarScanner 4.0';'
withSonarQubeEnv('SonarQube_Cloud') {
// sh “/usr/local/apache-maven/apache-maven-3.3.9/bin/mvn sonar:sonar -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=admin -Dsonar.password=admin -Dsonar.github.repository=bvelivala/SampleInsurance -Dsonar.projectName=Autoclaim_${BUILD_NUMBER} -Dsonar.projectVersion=${BUILD_NUMBER} -Dsonar.sources=src/main”
// sh 'sonarScanner -Dproject.settings=sonar-scanner.properties'
// sh './gradlew sonarqube'
// println ${env.SONAR_HOST_URL}
sh '${SCANNER_HOME}/bin/sonar-scanner -Dproject.settings=${SCANNER_HOME}/conf/sonar-scanner.properties'
}
}*/
}
stage('UAT deploy') {
steps {
echo 'UAT deploy'
}
/*steps {
echo 'running UAT deploy'
sh '/usr/local/bin/mvn package'
snDevOpsArtifact(artifactsPayload:"""{"artifacts": [{"name": "${artifactName}","version":"${artifactVersion}","semanticVersion": "${artifactSemVersion}","repositoryName": "${repoName}"}]}""")
}*/
}
stage('UAT test') {
steps {
kube 'runnig UAT deploy'
echo 'UAT test'
}
/*steps {
kube 'running UAT deploy'
kube 'running PROD deploy'
}*/
}
}
}