Examples of GitRepository


Examples of org.eluder.coveralls.maven.plugin.domain.GitRepository

    /**
     * @return job that describes the coveralls report
     * @throws IOException if an I/O error occurs
     */
    protected Job createJob() throws IOException {
        Git git = new GitRepository(project.getBasedir()).load();
        return new Job()
            .withRepoToken(repoToken)
            .withServiceName(serviceName)
            .withServiceJobId(serviceJobId)
            .withServiceBuildNumber(serviceBuildNumber)
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

            return result;
        }
    }

    private org.guvnor.structure.repositories.Repository makeRepository( final Path repositoryRoot ) {
        return new GitRepository() {
            @Override
            public Path getRoot() {
                return repositoryRoot;
            }
        };
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

                if ( repositoryPath == null ) {
                    result.setStatus( JobStatus.RESOURCE_NOT_EXIST );
                    result.setResult( "Repository [" + repoName + "] does not exist" );
                    return result;
                }
                GitRepository repo = new GitRepository( repoName );
                repositories.add( repo );
            }
            organizationalUnit = organizationalUnitService.createOrganizationalUnit( organizationalUnitName,
                                                                                     organizationalUnitOwner,
                                                                                     repositories );
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

        }

        OrganizationalUnit organizationalUnit = new OrganizationalUnitImpl( organizationalUnitName,
                                                                            null );

        GitRepository repo = new GitRepository( repositoryName );
        try {
            organizationalUnitService.addRepository( organizationalUnit,
                                                     repo );
        } catch ( IllegalArgumentException e ) {
            result.setStatus( JobStatus.BAD_REQUEST );
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

            result.setResult( "Repository [" + repositoryName + "] does not exist" );
            return result;
        }

        OrganizationalUnit organizationalUnit = new OrganizationalUnitImpl( organizationalUnitName, null );
        GitRepository repo = new GitRepository( repositoryName );
        try {
            organizationalUnitService.removeRepository( organizationalUnit,
                                                        repo );
        } catch ( IllegalArgumentException e ) {
            result.setStatus( JobStatus.BAD_REQUEST );
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

                                   pom,
                                   "http://localhost" );
    }

    private org.guvnor.structure.repositories.Repository makeRepository( final Path repositoryRoot ) {
        return new GitRepository() {

            @Override
            public Path getRoot() {
                return repositoryRoot;
            }
View Full Code Here

Examples of org.guvnor.structure.repositories.impl.git.GitRepository

    public Repository newRepository(ConfigGroup repoConfig, String branch) {
        validate(repoConfig);
        checkNotNull("branch", branch);

        final GitRepository repo = new GitRepository(repoConfig.getName());
        repo.setCurrentBranch(branch);

        for (final ConfigItem item : repoConfig.getItems()) {
            if (item instanceof SecureConfigItem) {
                repo.addEnvironmentParameter(item.getName(), secureService.decrypt(item.getValue().toString()));
            } else {
                repo.addEnvironmentParameter(item.getName(), item.getValue());
            }
        }

        if (!repo.isValid()) {
            throw new IllegalStateException("Repository " + repoConfig.getName() + " not valid");
        }

        FileSystem fs = null;
        URI uri = null;
        try {
            uri = URI.create(repo.getUri());
            fs = ioService.newFileSystem(uri, new HashMap<String, Object>(repo.getEnvironment()) {{
                if (!repo.getEnvironment().containsKey("origin")) {
                    put("init", true);
                }
            }});
        } catch (final FileSystemAlreadyExistsException e) {
            fs = ioService.getFileSystem(uri);
        } catch (final Throwable ex) {
            throw new RuntimeException(ex.getCause().getMessage(), ex);
        }

        org.uberfire.backend.vfs.Path defaultRoot = convert(fs.getRootDirectories().iterator().next());
        Map<String, org.uberfire.backend.vfs.Path> branches = getBranches(fs);
        if (branches.containsKey(branch)) {
            defaultRoot = branches.get(branch);
        }
        repo.setBranches(branches);

        repo.setRoot(defaultRoot);
        final String[] uris = fs.toString().split("\\r?\\n");
        final List<PublicURI> publicURIs = new ArrayList<PublicURI>(uris.length);

        for (final String s : uris) {
            final int protocolStart = s.indexOf("://");
            final PublicURI publicURI;
            if (protocolStart > 0) {
                publicURI = new DefaultPublicURI(s.substring(0, protocolStart), s);
            } else {
                publicURI = new DefaultPublicURI(s);
            }
            publicURIs.add(publicURI);
        }
        repo.setPublicURIs(publicURIs);

        return repo;
    }
View Full Code Here

Examples of org.platformlayer.service.git.model.GitRepository

  public void beforeCreateItem(ItemBase item) throws OpsException {
    super.beforeCreateItem(item);

    // TODO: This doesn't feel like the right place for this
    if (item instanceof GitRepository) {
      GitRepository repo = (GitRepository) item;

      if (Strings.isNullOrEmpty(repo.name)) {
        repo.name = repo.getId();
      }
    }
  }
View Full Code Here

Examples of org.platformlayer.service.git.model.GitRepository

    openFirewall(service, GitServerController.PORT);
    Assert.assertTrue(isPortOpen(socketAddress));

    String repoId = "repo" + id;
    GitRepository repo = new GitRepository();
    repo.name = repoId;
    repo = putItem(repoId, repo);
    repo = waitForHealthy(repo);

    // TODO: Make endpoint http://<ip>:<port>/<path>...
View Full Code Here

Examples of org.platformlayer.service.git.model.GitRepository

  public void handler(GitRepository model) {
  }

  @Override
  protected void addChildren() throws OpsException {
    GitRepository model = OpsContext.get().getInstance(GitRepository.class);

    File gitBase = new File("/var/git");
    File repoDir = new File(gitBase, model.name);

    {
      ManagedDirectory dir = ManagedDirectory.build(repoDir, "755");
      addChild(dir);
    }

    {
      GitRepoInit initRepo = injected(GitRepoInit.class);
      initRepo.repoDir = repoDir;
      addChild(initRepo);
    }

    {
      BackupDirectory backup = injected(BackupDirectory.class);
      backup.itemKey = model.getKey();

      backup.backupRoot = repoDir;

      addChild(backup);
    }
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.