Access the jenkins.log or folder when using jenkinsrule

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Access the jenkins.log or folder when using jenkinsrule

Charles Moulliard
Hi,

Is it possible to access to the jenkins.log or the folder containing the files as I got this error when I run a junit test case ?

Legacy code started this job.  No cause information is available
Running as SYSTEM
Building in workspace /var/folders/t2/jwchtqkn5y76hrfrws7dqtqm0000gn/T/j h2639828161785432376/workspace/test0
Processing DSL script mavenProject/mavenJob.groovy
ERROR: java.io.IOException: Unable to read /var/folders/t2/jwchtqkn5y76hrfrws7dqtqm0000gn/T/j h2639828161785432376/jobs/mvn-spring-boot-rest-http/config.xml
Finished: FAILURE

Example of code:

    @Rule
    public JenkinsRule j = new JenkinsRule();

    @Test
    public void useMavenDSLGroovyFileAsJob() throws Exception {
        FreeStyleProject p = j.createFreeStyleProject();
        p.scheduleBuild2(0).get(); // run a build to create a workspace
        p.getSomeWorkspace().child("mavenProject/mavenJob.groovy").copyFrom(getClass().getResourceAsStream("/mavenJob.groovy"));

        ExecuteDslScripts e = new ExecuteDslScripts();
        e.setTargets("mavenProject/mavenJob.groovy");
        p.getBuildersList().add(e);

        // Assert if build succeeded, if the Script executed includes the echo message
        FreeStyleBuild b = j.assertBuildStatusSuccess(p.scheduleBuild2(0).get());

Cheers

Charles



--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e4dfe5ba-f5be-4fad-9366-0d9566b5d281n%40googlegroups.com.