Hello, I try to reproduce with a unit test directly on my svn server. com.myapp.server contains 2 externals : com.myapp.server.webapp and another one. But the error not occured. The changelog file is always empty (<log/>) maybe i must do another previous call to feed it. How this following test is different as a checkout directly by jenkins 2 ? : {{ @Test(timeout = 0L) public void testCheckoutHttpsWithExternalsAndAuthentification() throws Exception { SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(), Arrays.<Credentials>asList( new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "1-login", null, "mylogin", "mypassword") ) )); List<SubversionSCM.ModuleLocation> locations = Arrays.asList( new SubversionSCM.ModuleLocation("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", "1-login",".", SVNDepth.INFINITY.getName(), false) ); List<SubversionSCM.AdditionalCredentials> additionalCredentials = Arrays.asList( new SubversionSCM.AdditionalCredentials("Magillem Design Services SVN","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY:443","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server.webapp","1-login") ); SCM scm = new SubversionSCM(locations, new UpdateUpdater(), null, null, "", "", "", "", false, false, additionalCredentials); SCMSource source = new SingleSCMSource(null, "https://192.168..XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", scm); TaskListener listener = StreamTaskListener.fromStdout(); // First check fetching of all heads. SCMHeadObserver.Collector.result is a TreeMap so order is predictable: assertEquals("[SCMHead {'https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server'} ]", source.fetch(listener).toString()); // SCM.checkout does not permit a null build argument, unfortunately. Run<?,?> run = r.buildAndAssertSuccess(r.createFreeStyleProject()); // Retrieval of heads: FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds 1")).child("tmp"); Launcher launcher = new Launcher.LocalLauncher(listener); SCMRevisionState scmRevisionState = scm.calcRevisionsFromBuild(run , ws, launcher, listener); assertRevision2(source.fetch(new SCMHead("https://192.168.20.150/repos/svnflow/crystalbulb/trunk/server/com.mds.crystalbulb.server"), listener), "null", source, run, listener, launcher, scmRevisionState); } private void assertRevision2(@CheckForNull SCMRevision rev, @CheckForNull String expectedFile, @NonNull SCMSource source, @NonNull Run<?,?> run, @NonNull TaskListener listener, Launcher launcher, SCMRevisionState scmRevisionState) throws Exception { if (rev == null) { assertNull(expectedFile); return; } FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds 1")).child("tmp"); File changelog = new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds\\1 changelog"); source.build(rev.getHead(), rev).checkout(run, launcher, ws, listener, changelog, scmRevisionState); FilePath file = ws.child("file"); assertEquals(expectedFile, file.exists() ? file.readToString() : null); }}} |