Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c6713bd4e | ||
|
|
a04c37e9d1 | ||
|
|
1da2d025a9 | ||
|
|
b31c0ad485 | ||
|
|
b9cb17cce5 | ||
|
|
2edf9f641c | ||
|
|
cf4db6c3a2 | ||
|
|
fff755dec7 |
17
.project
17
.project
@ -25,12 +25,29 @@
|
||||
<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>
|
||||
|
||||
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@ -1,17 +1,27 @@
|
||||
def MAVEN_IMAGE = 'maven:3.8.2-openjdk-11-slim'
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
// agent any
|
||||
|
||||
agent {
|
||||
docker {
|
||||
image "${MAVEN_IMAGE}"
|
||||
}
|
||||
}
|
||||
|
||||
environment {
|
||||
BRANCH_NAME = env.GIT_BRANCH.replace('origin/', '')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image "${MAVEN_IMAGE}"
|
||||
}
|
||||
}
|
||||
// agent {
|
||||
// docker {
|
||||
// image "${MAVEN_IMAGE}"
|
||||
// }
|
||||
// }
|
||||
steps {
|
||||
git 'https://github.com/mabayhan/sonarqubejava'
|
||||
git 'https://forge.bayhan.ca/mali/sonarqubejava'
|
||||
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
||||
}
|
||||
|
||||
@ -24,34 +34,35 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Static Code Analysis') {
|
||||
// docker:start
|
||||
// maven:start
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'sonarsource/sonar-scanner-cli'
|
||||
// image "${MAVEN_IMAGE}"
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// withSonarQubeEnv('cicd') {
|
||||
// echo '################# MAVEN ###################'
|
||||
// sh 'sonar-scanner -Dsonar.projectKey=sonarqubejava:multimodule -Dsonar.sources=. -Dsonar.java.binaries=.'
|
||||
// }
|
||||
// }
|
||||
// docker:end
|
||||
|
||||
// maven:start
|
||||
agent {
|
||||
docker {
|
||||
image "${MAVEN_IMAGE}"
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
withSonarQubeEnv('cicd') {
|
||||
echo '################# MAVEN ###################'
|
||||
sh 'mvn sonar:sonar'
|
||||
echo '############### 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}'
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
BIN
module1/target/classes/com/acme/module1/Module1.class
Normal file
BIN
module1/target/classes/com/acme/module1/Module1.class
Normal file
Binary file not shown.
BIN
module1/target/test-classes/com/acme/module1/Module1Test.class
Normal file
BIN
module1/target/test-classes/com/acme/module1/Module1Test.class
Normal file
Binary file not shown.
BIN
module2/target/classes/com/acme/module2/Module2.class
Normal file
BIN
module2/target/classes/com/acme/module2/Module2.class
Normal file
Binary file not shown.
BIN
module2/target/test-classes/com/acme/module2/Module2Test.class
Normal file
BIN
module2/target/test-classes/com/acme/module2/Module2Test.class
Normal file
Binary file not shown.
17
pom.xml
17
pom.xml
@ -1,6 +1,5 @@
|
||||
<?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>
|
||||
@ -80,8 +79,20 @@
|
||||
</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>
|
||||
BIN
tests/target/test-classes/com/acme/its/ModulesTest.class
Normal file
BIN
tests/target/test-classes/com/acme/its/ModulesTest.class
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user