In a specific project built in Jenkins/Sonar, the build job never terminates.
In the console, we can see:
[INFO] ... ANALYSIS SUCCESSFUL, you can browse ....
[INFO] ... Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
In every run, the build halts at the same line in the console. If we enter the sonar report, all information from the new build seems to be up to date.
Other projects works like a charm.
Any ideas about what might be wrong?
Related
I am finishing a Continuous Integration system with Jenkins and Gradle for a REST service. It will build the App and dependent sub-libraries, build a Docker, start main docker and secondary ones (database, ...) all in Gradle.
As it is a REST service I have a separate project that executes the REST tests completely from outside my project just as it is a REST client, and works ok...
Once my project is built and everything running I need to execute the build in the other project (which is just for tests) as a subproject, and wether it passes or not the tests I want to continue the main script as Dockers need to be stopped and deleted. What is the best approach for this?
Thanks
You just need to create a task with type: GradleBuild in parameter
Example:
task buildAnotherProjectTask(type: GradleBuild) {
buildFile = '../pathToBuildFileInTheOtherProject/build.gradle'
tasks = ['build'] // You can run any task like that
tasks = ['test']
}
and to run it u can use the following command
gradle buildAnotherProjectTask
This is worked with me when i tried it.
Hope my answer will help :)
I am running Scala (and Spark) tests using FunSuite in Eclipse (Kepler). I have been able to successfully run the tests. I then created a new package (in the same source folder and project) and am running into a problem.
When I select run as:
I am able to successfully run my tests using both the 1st (ScalaTest – File) and 3rd (ScalaTest – Test) options. However, when I try and run method 2 (ScalaTest – Suite), I get:
***RUN ABORTED ***
java.lang.ClassNotFoundException: com.domain.gotime.rdd.Test1
Why is that I am getting this error for the Suite only? I am planning on this being run automatically with Jenkins – and want to know if I need to fix this, and if so how?
I have looked over this page but am still confused as to why it isn't working.
Please check that com.domain.gotime.rdd.Test1 is in the classpath of the auto-created Run Configuration.
I am currently in a process of setting up Jenkins-CI for my Scala/Akka project.
I managed to create build that is integrated with BitBucket and executes builds when new pull reuqest is created/old pull request is updated.
As a testing framework we are using Specs2 which is also integrated with Jenkins by using JUnit post-build action. Now I am wondering how to properly execute e2e tests in my build.
Basically in git repository we have 2 projects, lets call them main-project and rest-tests. rest-tests contains e2e tests that are written using REST-assured library. To execute them I need to start main-project application (which uses Spray library to set up HTTP server) and then execute test task in sbt project of rest-test.
My idea was to execute main-project startup script (generated by sbt-native-packager) whith something like this:
$WORKSPACE/main-project/target/universal/stage/bin/main-project & echo $! > /tmp/main-project.pid
then execute test task of rest-tests project and finally kill process with PID that is saved in /tmp/main-project.pid file.
The last step should be implemented using https://wiki.jenkins-ci.org/display/JENKINS/Post+build+task because if some rest-testswill fail the next steps of build will not be executed (or at least that is what I am thinking) and I could end with my instance of application running after the build is finished.
This is first time when I am setting up CI system and my solution seems to be a little hacky (at least to me). I am wondering if there is a better/more idiomatic way of solving my problem of running e2e tests which require another application running.
I am trying to use a pre-build step in eclipse in CDT. According to description here: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_build_settings_steps.htm
The pre-build step is not executed if the state of the main build is
determined to be up to date; otherwise it is executed. An attempt to
execute the main build will occur regardless of the success or failure
of executing the pre-build step.
I have 2 problems with it:
1. The pre-build step is always executed even if the main build has nothing to build.
2. The prebuild step is executed after the main build.
Is this a bug or I am just doing something wrong?
Thanks.
NUnit tests being aborted randomly (Involves ServiceStack & RavenDB)
We have a project where we use ServiceStack and RavenDB. Testing is done using NUnit.
When running the tests individually everything works fine.
When running more than one test a few will do their thing (pass/fail) but very often one of the tests will be aborted and all subsequent tests will not be run.
Which test aborts is seemingly random. The more tests that are being run the higher the chance that one will be aborted.
The test that gets aborted does seem to be able to run through all its actions though seeing from the test log.
Unfortunately I'm not able to give more info besides the following files which show the way our tests are set up.
IntegrationBaseTest.cs (Base test class)
GlobalSetupFixture.cs
AccountServiceTests.cs (Example file with tests)
test log (Log of aborted test, in this case DeleteAccount_DeletesAccount)
Result view of running all tests in AccountServiceTests.cs.
Which test gets aborted is completely random.
Does anyone have any idea of what I could try to fix this? :)
It turned out that when disabling the logging the tests ran normally without aborting.
I'm not sure what caused them to abort but I think it might be because the jetbrains taskrunner was running out of memory because of all the logs.