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>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</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>

62
Jenkinsfile vendored
View File

@ -1,25 +1,15 @@
def MAVEN_IMAGE = 'maven:3.8.2-openjdk-11-slim'
pipeline {
// agent any
agent {
docker {
image "${MAVEN_IMAGE}"
}
}
environment {
BRANCH_NAME = env.GIT_BRANCH.replace('origin/', '')
}
agent any
stages {
stage('Build') {
// agent {
// docker {
// image "${MAVEN_IMAGE}"
// }
// }
agent {
docker {
image "${MAVEN_IMAGE}"
}
}
steps {
git 'https://forge.bayhan.ca/mali/sonarqubejava'
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
@ -34,35 +24,39 @@ pipeline {
}
stage('Static Code Analysis') {
// maven:start
// docker:start
// agent {
// 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 {
withSonarQubeEnv('cicd') {
echo '################# MAVEN ###################'
sh 'mvn sonar:sonar'
echo '############### MAVEN END #################'
//sh 'mvn sonar:sonar'
sh "${SCANNER_HOME}/bin/sonar-scanner"
}
}
// maven:end
}
// stage('Pact'){
// // agent {
// // docker {
// // image "${MAVEN_IMAGE}"
// // }
// // }
// steps{
// sh 'mvn pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=${BRANCH_NAME}'
// }
// }
}
}

17
pom.xml
View File

@ -1,5 +1,6 @@
<?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>
<groupId>org.sonarqube</groupId>
@ -79,20 +80,8 @@
</execution>
</executions>
</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>
</build>
</profile>
</profiles>
</project>
</project>

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