Compare commits

...

8 Commits

Author SHA1 Message Date
Mali Bayhan
8c6713bd4e pact-test Sync Repo 2021-12-10 11:36:58 -08:00
Mali Bayhan
a04c37e9d1 pact-test Sync Repo 2021-12-10 11:34:40 -08:00
Mali Bayhan
1da2d025a9 pact-test Sync Repo 2021-12-10 08:59:54 -08:00
Mali Bayhan
b31c0ad485 pact-test Sync Repo 2021-12-10 08:58:00 -08:00
Mali Bayhan
b9cb17cce5 pact-test Sync Repo 2021-12-10 08:57:18 -08:00
Mali Bayhan
2edf9f641c pact-test Sync Repo 2021-12-10 08:54:38 -08:00
Mali Bayhan
cf4db6c3a2 pact-test Sync Repo 2021-12-09 16:20:02 -08:00
Mali Bayhan
fff755dec7 pact-test Sync Repo 2021-12-09 16:15:26 -08:00
8 changed files with 65 additions and 26 deletions

View File

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

@ -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}'
// }
// }
}
}

Binary file not shown.

Binary file not shown.

17
pom.xml
View File

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