Examples of DotCiTemplate


Examples of com.groupon.jenkins.buildtype.install_packages.template.DotCiTemplate

public class BuildConfigurationCalculator {

    public BuildConfiguration calculateBuildConfiguration(String githubRepoUrl, String sha, EnvVars envVars) throws IOException, InterruptedException, InvalidBuildConfigurationException {
        GithubRepositoryService githubRepositoryService = getGithubRepositoryService(githubRepoUrl);
        DotCiTemplate dotCiTemplate = new DotCiTemplate();
        try {
            GHContent file = githubRepositoryService.getGHFile(".ci.yml", sha);
            BuildConfiguration configuration = new BuildConfiguration(file.getContent(), envVars);
            if (!configuration.isValid()) {
                throw new InvalidBuildConfigurationException(configuration.getValidationErrors());
            }
          if(configuration.getLanguage() == null){
              DotCiTemplate defaultParentTemplate = dotCiTemplate.getDefaultFor(githubRepositoryService.getGithubRepository()); //.getBuildConfiguration(envVars);
              return dotCiTemplate.getMergedTemplate(configuration,defaultParentTemplate,envVars);
          }
            return dotCiTemplate.getMergedTemplate(configuration, configuration.getLanguage(), envVars);
        } catch (FileNotFoundException e) {
            return dotCiTemplate.getDefaultFor(githubRepositoryService.getGithubRepository()).getBuildConfiguration(envVars);
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.