my PR - https://travis-ci.org/spring-cloud/spring-cloud-zookeeper/builds/74302452 - continuously fails to build even though locally on 3 different machines it's working.
I receive very bizarre errors like compilation errors and tests failed.
The thing is that I've managed to build the branch - https://travis-ci.org/marcingrzejszczak/spring-cloud-zookeeper/builds/74301310 .
From what I see when Travis builds the PR it fails to take out proper revision. For example I bumped up Groovy to 2.4.4 but in logs you can see
[INFO] --- gmavenplus-plugin:1.4:testCompile (default) # spring-cloud-zookeeper-core ---
[INFO] Using Groovy 2.4.3 to perform testCompile.
[INFO] Compiled 2 files.
whereas locally I have
[INFO] --- gmavenplus-plugin:1.4:testCompile (default) # spring-cloud-zookeeper-core ---
[INFO] Using Groovy 2.4.4 to perform testCompile.
[INFO] Compiled 2 files.
Please help cause I can't merge a fully functional PR.
There were some issues with caching AFAIR.
Related
I have a Jenkins job to copy some test reports(XML) to local and convert them to JUnit reports via xUnit.
The issue is that there are no failed or skipped tests, but I always get
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to FAILURE
[xUnit] [INFO] - Stopping recording.
Finished: FAILURE
What causes this?
On my previous project I was running 3 development teams with 4 solutions that together consisted an integrated platform all on one Jenkins Master.
I had 2 DOS batch files that were held in a JenkinsScripts/ subdirectory at the root of each solution. One was called CodeCoverage.bat (which ensured OpenCover and ReportGenerator watched the unit tests) which in turn called RunUnitTests.bat passing parameters.
In RunUnitTests.bat the key line with many parameters resolved to:
packages\xunit.runner.console.2.1.0\tools\xunit.console.exe <MyUnitTestProject.dll> -nologo -noshadow -nunit TestReports\TestResults.xml
Hence, I was converting XUnit result XML to NUnit result XML and using the NUnit Plugin to publish the results.
Since I used this approach, the options for mapping of XUnit and NUnit 3 XML to Jenkins friendly JUnit (at my behest mind you) has improved.
Need some help figuring out how to configure Jenkins on Openshift to deploy an app to Tomcat (JBoss EWS2.0).
The default setup using just rhc commands to instantiate a Jenkins gear and a JBoss EWS gear fails me.
I just changed the URL for the source control part in Jenkins, and it finds the source and the build works.
But it fails when trying to deploy with this message:
[INFO] Installing /var/lib/openshift/532351cee0b8cd0ba4000001/app-root/runtime/repo/pom.xml to /var/lib/openshift/532351cee0b8cd0ba4000001/.m2/repository/ca/architech/apl_web_sk_hb_mp/1.0/apl_web_sk_hb_mp-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.484s
[INFO] Finished at: Fri Mar 14 15:04:18 EDT 2014
[INFO] Final Memory: 9M/179M
[INFO] ------------------------------------------------------------------------
Archiving artifacts
ERROR: No artifacts found that match the file pattern "webapps/**". Configuration error?
ERROR: 'webapps/**' doesn't match anything, but '**' does. Perhaps that's what you mean?
Build step 'Archive the artifacts' changed build result to FAILURE
Finished: FAILURE
I noticed the build and deploy is done through shell with the gear command and all that stuff.
I would prefer to use Maven, since my project is maven-ized already, but then I cannot figure out how to configure the target URL for deployment in the pom.xml either.
So - either one option would do the trick for me!
Appreciate your help, attention and feedback!
I had the same error, i managed to solve it by changing (as suggested) webapps/** by ** in the configurations at the bottom of this page :
http://yourapp-domain.rhcloud.com/job/dev-build/configure
I'm not really sure what it does though...
As a former Java developer who is used to using Jenkins to launch JUnit tests every time a build is performed, I would love to get my Specs to run in a similar manner.
When running sbt test in the command line, the test cases that I have set up run just fine. Below is the output from the test run:
[info] MySqlStoreSpec
[info]
[info] MySqlStore Spec should
[info] + getUserIdFromEmail
[info] + getUserUserProperties
[info] + getUserHashFromEmail
[info] + md5
[info] + getUserContextFromStripeId
[info]
[info]
[info] Total for specification MySqlStoreSpec
[info] Finished in 24 ms
[info] 5 examples, 0 failure, 0 error
When I run the build in Jenkins, I get the following message:
[info] No tests to run for test:test
I suspect that the issue with not kicking off the tests has to do with my sbt setup in Jenkins. In the configuration for the build, I am using sbt launcher 0.12.4 and actions test. Does anyone have any experience with getting specs2 to run on Jenkins?
Turns out the issue was the build being performed on the wrong directory. Once the project was checked out from git, it needed to move into a subdirectory to get to the project files. It seems that SBT reports a successful run even if it finds no project files.
Our project is a multi module plugin project built using maven. The Sonar analysis runs fine but in the process generates a lot of warnings and probably incorrect results. Below is the set up of the project and warnings generated during analysis. Any help in fixing these warnings is highly appreciated.
Project setup:
Sonar analysis via the jenkins build.
Jenkins Sonar plugin is used to run the analysis.
Jenkins and Sonar along with MySQL are running on different machines.
Below properties are provided to Sonar plugin in Jenkins during sonar analysis.
-Dsonar.profile="My Project Profile"
-Dsonar.dynamicAnalysis=reuseReports
-Dsonar.core.codeCoveragePlugin=jacoco
-Dsonar.jacoco.reportPath=../../releng/com.mycompany.myproject.releng.builds/coverage_data/jacoco.exec
Below are the warnings generated during analysis:
Note: The below warnings are not generated if Sonar and Jenkins are running in the same machine
Before the Sonar analysis of individual modules the following error is thrown.
[WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
15:04:52 [WARNING] o com.mycompany.myproject.plugins:com.mycompany.myproject.external.libraries:jar:1.0.0-SNAPSHOT (provided)
15:04:52 [WARNING] Try running the build up to the lifecycle phase "package"
15:04:52 [WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
15:04:52 [WARNING] o com.mycompany.myproject.plugins:com.mycompany.myproject.somefunctionality.framework:jar:1.0.0-SNAPSHOT (provided)
During the analysis of the modules, it throws the following warning
Class 'com/mycompany/myproject/core/common/datatransfers/MyClass' is not accessible through the ClassLoader.
[WARN] [15:05:25.731] Class 'com/mycompany/myproject/core/common/datatransfers/MyClass' is not accessible through the ClassLoader.
Almost all modules are marked as skipped after the analysis after the build is complete, However the analysis results are available in Sonar.
[INFO] com.mycompany.myproject.platform.feature ................ SKIPPED
[INFO] com.mycompany.myproject.somefeature.feature ... SKIPPED
[INFO] My Product ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
I know this is a late reply, but I had the same problem and it turned out that I had run mvn clean package instead of mvn clean install. I found this thread on the SonarQube mailing list, hope this helps.
This warning may simply due to a race condition in plugins such as maven-jar-plugin (I had the same warning in another Sonar unrelated case with Maven 3.6.3).
Let's consider the following project layout:
acme-parent parent for all project
acme-aggregator
acme-common
acme-p1 depends on acme-common
acme-p2 depends on acme-common
acme-p3 depends on acme-common
acme-p4 depends on acme-p2 and acme-p3
Maven will build in this order:
acme-parent
acme-common
acme-p1, acme-p2, acme-p3 and acme-p4
However, for the internal machinery, it is another story:
acme-p2 and acme-p3 are not in the local repository
all are in the reactor
during invocation of a plugin in acme-p1, maven will validate the artifact found in the reactor and will try to resolve path of local artifact but fail (hence the warning).
If you move acme-p4 before acme-p1, this change the build order: the warning goes away (note: the dependencies needs to be removed from local repository) because now, acme-p2 and acme-p3 are effectively built before acme-p1.
Maven will build in this order:
acme-parent
acme-common
acme-p2, acme-p3, acme-p4 and acme-p1
There are some fixes:
Adding a dependency from acme-p4 to acme-p1: this will enforce the build order at the cost of extra care (in my real use case, acme-p4 packages acme-p2 and acme-p3 using maven-assembly-plugin).
Reorder project in reactor: I did not test that with the -T options, allowing concurrent build, but I think it may also fail.
Do a package build: it is mentioned by the warning, but I suspect that Maven will in some case reference an artifact in the local repository or in the remote repository (if you deploy SNAPSHOT on them). This may be tricky: if someone change the signature of a method, then Maven may download the SNAPSHOT (it is newer, and it is NOT in the reactor, therefore it is better than the local repo) and the build may fail (this is purely my hypothesis).
This may also be an error in Maven in how it order module in the reactor.
I'm creating a "Mavenised" Grails project but am having trouble running the maven install goal on the project.
To create the project I've used the following archetype: grails-maven-archetype
It has built my project structure correctly and set up all the necessary configuration files (pom.xml etc)
However, when I run mvn install on this I get the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.206s
[INFO] Finished at: Thu Mar 15 10:40:15 GMT 2012
[INFO] Final Memory: 65M/366M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-test (default) on project MyApp: Unable to start Grails: java.lang.reflect.InvocationTargetException: Native Library C:\Users\<username>\AppData\Local\Temp\jline_.dll already loaded in another classloader -> [Help 1]
However when I run the grails goals that this is trying to run individually e.g. mvn grails:maven-compile they work and I am able to fully build the project.
I am guessing when running mvn install the process is locking the jline_.dll and not releasing it before trying to read it in again in the next goal.
Has anyone seen this issue before? Any advice on how to get around this?
I really need mvn install to build the project correctly so I can set up effective build scripts.
Thanks!
The 2.0.1 version doesn't work on Windows machines. Known issue. Sorry about that, you will need to wait for 2.0.2