Examples of ModuleLocation


Examples of hudson.scm.SubversionSCM.ModuleLocation

    }

    public void testExcludeByUser() throws Exception {
        FreeStyleProject p = createFreeStyleProject( "testExcludeByUser" );
        p.setScm(new SubversionSCM(
                Arrays.asList( new ModuleLocation( "https://svn.jenkins-ci.org/trunk/hudson/test-projects/testSubversionExclusions@19438", null )),
                new UpdateUpdater(), null, "", "dty", "", "", null)
                );
        // Do a build to force the creation of the workspace. This works around
        // pollChanges returning true when the workspace does not exist.
        p.scheduleBuild2(0).get();
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

    @Test
    public void testIgnorePropertyOnlyDirChanges() throws Exception {
  File repo = new CopyExisting(getClass().getResource("ignoreProps.zip")).allocate();
        FreeStyleProject p = createFreeStyleProject( "testIgnorePropertyOnlyDirChanges" );
        SubversionSCM scm = new SubversionSCM(
                Arrays.asList( new ModuleLocation( "file://" + repo.toURI().toURL().getPath() + "/p", "." )),
                new UpdateUpdater(), null, null, null, null, null, null, true);
  p.setScm(scm);
        // Do a build to force the creation of the workspace. This works around
        // pollChanges returning true when the workspace does not exist.
        p.scheduleBuild2(0).get();
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

    }

    public void testMultiModuleEnvironmentVariables() throws Exception {
        FreeStyleProject p = createFreeStyleProject();
        ModuleLocation[] locations = {
            new ModuleLocation("https://svn.jenkins-ci.org/trunk/hudson/test-projects/trivial-ant", null),
            new ModuleLocation("https://svn.jenkins-ci.org/trunk/hudson/test-projects/trivial-maven", null)
        };
        p.setScm(new SubversionSCM(Arrays.asList(locations), new CheckoutUpdater(), null, null, null, null, null, null));

        CaptureEnvironmentBuilder builder = new CaptureEnvironmentBuilder();
        p.getBuildersList().add(builder);
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

        Proc p = runSvnServe(getClass().getResource("JENKINS-6209.zip"));
        try {
                FreeStyleProject b = createFreeStyleProject();

            ModuleLocation[] locations = {
                    new ModuleLocation("svn://localhost/y", null),
                    new ModuleLocation("svn://localhost/z", null)
                };

            b.setScm(new SubversionSCM(Arrays.asList(locations), new CheckoutUpdater(), null, null, null, null, null, null));

            FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

        try {
            FreeStyleProject b = createFreeStyleProject();

            ModuleLocation[] locations = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "no_externals", "infinity", true),
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "with_externals", "infinity", false)
                };

            b.setScm(new SubversionSCM(Arrays.asList(locations), new CheckoutUpdater(), null, null, null, null, null, null));

            FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

        try {
            FreeStyleProject b = createFreeStyleProject();

            ModuleLocation[] locations = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "empty", "empty", true),
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "files", "files", true),
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "immediates", "immediates", true),
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "infinity", "infinity", true)
                };

            b.setScm(new SubversionSCM(Arrays.asList(locations), new CheckoutUpdater(), null, null, null, null, null, null));

            FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

            submit(f);

            FreeStyleProject b = createFreeStyleProject();

            ModuleLocation[] locations = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "proja", "infinity", true)
                };

            // Do initial update with infinite depth and check that file1 exists
            b.setScm(new SubversionSCM(Arrays.asList(locations), new UpdateUpdater(), null, null, null, null, null, null));
            FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
            FilePath ws = build.getWorkspace();
            assertTrue(ws.child("proja").child("file1").exists());

            // Trigger new build with depth empty and check that file1 no longer exists
            ModuleLocation[] locations2 = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "proja", "empty", true)
                };
            b.setScm(new SubversionSCM(Arrays.asList(locations2), new UpdateUpdater(), null, null, null, null, null, null));
            FreeStyleBuild build2 = assertBuildStatusSuccess(b.scheduleBuild2(0));
            ws = build2.getWorkspace();
            assertTrue(!(ws.child("proja").child("file1").exists()));
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

            submit(f);

            FreeStyleProject b = createFreeStyleProject();

            ModuleLocation[] locations = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "proja", "infinity", true)
                };

            // Do initial update with infinite depth and check that subdir exists
            b.setScm(new SubversionSCM(Arrays.asList(locations), new UpdateUpdater(), null, null, null, null, null, null));
            FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
            FilePath ws = build.getWorkspace();
            assertTrue(ws.child("proja").child("subdir").exists());

            // Simulate job using 'svn update --set-depth=files' and check that subdir no longer exists
            SvnClientManager svnm = SubversionSCM.createClientManager(b);
            svnm
            .getUpdateClient()
            .doUpdate(new File(ws.child("proja").getRemote()), SVNRevision.HEAD, SVNDepth.FILES, false, true);
           
            assertTrue(ws.child("proja").exists());
            assertTrue(!(ws.child("proja").child("subdir").exists()));

            // Trigger new build with depth unknown and check that subdir still does not exist
            ModuleLocation[] locations2 = {
                    new ModuleLocation("svn://localhost/jenkins-777/proja", "proja", "undefined", true)
                };
            b.setScm(new SubversionSCM(Arrays.asList(locations2), new UpdateUpdater(), null, null, null, null, null, null));
            FreeStyleBuild build2 = assertBuildStatusSuccess(b.scheduleBuild2(0));
            ws = build2.getWorkspace();
            assertTrue(!(ws.child("proja").child("subdir").exists()));
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

    @Test
    public void shouldSetEnvironmentVariablesWithSingleSvnModule() throws IOException {
        // GIVEN an scm with a single module location
        SubversionSCM scm = mockSCMForBuildEnvVars();
       
        ModuleLocation[] singleLocation = new ModuleLocation[] {new ModuleLocation("/remotepath", "")};
        when(scm.getLocations(any(EnvVars.class), any(AbstractBuild.class))).thenReturn(singleLocation);
       
        Map<String, Long> revisions = new HashMap<String, Long>();
        revisions.put("/remotepath", 4711L);
        when(scm.parseSvnRevisionFile(any(AbstractBuild.class))).thenReturn(revisions);
View Full Code Here

Examples of hudson.scm.SubversionSCM.ModuleLocation

    public void shouldSetEnvironmentVariablesWithMultipleSvnModules() throws IOException {
        // GIVEN an scm with a 2 module locations
        SubversionSCM scm = mockSCMForBuildEnvVars();
       
        ModuleLocation[] locations = new ModuleLocation[] {
                new ModuleLocation("/remotepath1", ""),
                new ModuleLocation("/remotepath2", "")};
        when(scm.getLocations(any(EnvVars.class), any(AbstractBuild.class))).thenReturn(locations);
       
        Map<String, Long> revisions = new HashMap<String, Long>();
        revisions.put("/remotepath1", 4711L);
        revisions.put("/remotepath2", 42L);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.