Compare commits

..

8 Commits

Author SHA1 Message Date
05815cf1be Update 'sonar-project.properties' 2022-09-13 13:56:21 -07:00
08937da092 Delete 'sonar.properties' 2022-09-13 13:56:05 -07:00
bc7dd8e872 Add 'sonar-project.properties' 2022-09-13 13:55:56 -07:00
25a5b9733a Add 'sonar.properties' 2022-09-13 13:55:11 -07:00
mali
ce9ff1438b asd 2022-03-17 22:57:51 +00:00
mali
de33d89ba7 asd 2022-03-17 22:46:10 +00:00
mali
899f8e0e44 asd 2022-03-17 22:44:43 +00:00
Mali Bayhan
be6e4e4f55 master- Sync Repo 2021-12-10 11:37:31 -08:00
9 changed files with 34 additions and 65 deletions

View File

@ -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>

52
Jenkinsfile vendored
View File

@ -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
stages {
stage('Build') {
agent { agent {
docker { docker {
image "${MAVEN_IMAGE}" image "${MAVEN_IMAGE}"
} }
} }
environment {
BRANCH_NAME = env.GIT_BRANCH.replace('origin/', '')
}
stages {
stage('Build') {
// agent {
// docker {
// 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,7 +24,25 @@ pipeline {
} }
stage('Static Code Analysis') { stage('Static Code Analysis') {
// docker:start
// agent {
// docker {
// 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 // maven:start
agent any
environment {
SCANNER_HOME = tool 'sonar-scanner-4.7'
}
//agent { //agent {
// docker { // docker {
// image "${MAVEN_IMAGE}" // image "${MAVEN_IMAGE}"
@ -44,25 +52,11 @@ pipeline {
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}'
// }
// }
} }
} }

15
pom.xml
View File

@ -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
View File

@ -0,0 +1,3 @@
sonar.projectKey=Test-1
sonar.host.url=https://sq.bayhan.ca
sonar.login=sqp_e927efa8e9e9e1162bb78a6f2374edde85516819