Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05815cf1be | |||
| 08937da092 | |||
| bc7dd8e872 | |||
| 25a5b9733a | |||
|
|
ce9ff1438b | ||
|
|
de33d89ba7 | ||
|
|
899f8e0e44 | ||
|
|
be6e4e4f55 |
17
.project
17
.project
@ -25,29 +25,12 @@
|
|||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
|
||||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<filteredResources>
|
|
||||||
<filter>
|
|
||||||
<id>1639159086860</id>
|
|
||||||
<name></name>
|
|
||||||
<type>30</type>
|
|
||||||
<matcher>
|
|
||||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
||||||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
||||||
</matcher>
|
|
||||||
</filter>
|
|
||||||
</filteredResources>
|
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|||||||
62
Jenkinsfile
vendored
62
Jenkinsfile
vendored
@ -1,25 +1,15 @@
|
|||||||
def MAVEN_IMAGE = 'maven:3.8.2-openjdk-11-slim'
|
def MAVEN_IMAGE = 'maven:3.8.2-openjdk-11-slim'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
// agent any
|
agent any
|
||||||
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image "${MAVEN_IMAGE}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
|
||||||
BRANCH_NAME = env.GIT_BRANCH.replace('origin/', '')
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
// agent {
|
agent {
|
||||||
// docker {
|
docker {
|
||||||
// image "${MAVEN_IMAGE}"
|
image "${MAVEN_IMAGE}"
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
steps {
|
steps {
|
||||||
git 'https://forge.bayhan.ca/mali/sonarqubejava'
|
git 'https://forge.bayhan.ca/mali/sonarqubejava'
|
||||||
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
||||||
@ -34,35 +24,39 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stage('Static Code Analysis') {
|
stage('Static Code Analysis') {
|
||||||
// maven:start
|
// docker:start
|
||||||
// agent {
|
// agent {
|
||||||
// docker {
|
// docker {
|
||||||
// image "${MAVEN_IMAGE}"
|
// image 'sonarsource/sonar-scanner-cli'
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
// steps {
|
||||||
|
// withSonarQubeEnv('cicd') {
|
||||||
|
// echo '################# MAVEN ###################'
|
||||||
|
// sh 'sonar-scanner -Dsonar.projectKey=sonarqubejava:multimodule -Dsonar.sources=. -Dsonar.java.binaries=.'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// docker:end
|
||||||
|
|
||||||
|
// maven:start
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
SCANNER_HOME = tool 'sonar-scanner-4.7'
|
||||||
|
}
|
||||||
|
//agent {
|
||||||
|
// docker {
|
||||||
|
// image "${MAVEN_IMAGE}"
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
withSonarQubeEnv('cicd') {
|
withSonarQubeEnv('cicd') {
|
||||||
echo '################# MAVEN ###################'
|
echo '################# MAVEN ###################'
|
||||||
sh 'mvn sonar:sonar'
|
//sh 'mvn sonar:sonar'
|
||||||
echo '############### MAVEN END #################'
|
sh "${SCANNER_HOME}/bin/sonar-scanner"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// maven:end
|
// maven:end
|
||||||
}
|
}
|
||||||
|
|
||||||
// stage('Pact'){
|
|
||||||
|
|
||||||
// // agent {
|
|
||||||
// // docker {
|
|
||||||
// // image "${MAVEN_IMAGE}"
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
|
|
||||||
// steps{
|
|
||||||
// sh 'mvn pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=${BRANCH_NAME}'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15
pom.xml
15
pom.xml
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.sonarqube</groupId>
|
<groupId>org.sonarqube</groupId>
|
||||||
@ -79,18 +80,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>au.com.dius</groupId>
|
|
||||||
<artifactId>pact-jvm-provider-maven_2.12</artifactId>
|
|
||||||
<version>3.5.24</version>
|
|
||||||
<configuration>
|
|
||||||
<pactBrokerUrl>http://cicd.bayhan.ca:9292</pactBrokerUrl>
|
|
||||||
<projectVersion>${pact.consumer.version}</projectVersion>
|
|
||||||
<tags>
|
|
||||||
<tag>${pact.tag}</tag>
|
|
||||||
</tags>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|||||||
3
sonar-project.properties
Normal file
3
sonar-project.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sonar.projectKey=Test-1
|
||||||
|
sonar.host.url=https://sq.bayhan.ca
|
||||||
|
sonar.login=sqp_e927efa8e9e9e1162bb78a6f2374edde85516819
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user