Examples of ConfigParameters


Examples of com.cloudbees.api.config.ConfigParameters

    protected List<ApplicationAlias> getAliases(BeesClient client, String appId) throws IOException {
        List<ApplicationAlias> applicationAliasList = new ArrayList<ApplicationAlias>();
        try {
            ConfigurationParametersResponse res = client.configurationParameters(appId, "application");
            if (res.getConfiguration() != null) {
                ConfigParameters configParameters = ConfigParameters.parse(res.getConfiguration());
                ParameterMap parameterMap = configParameters.getParameters();

                String param = parameterMap.get("blue-green");
                if (param != null) {
                    ApplicationAlias bgApp = new ApplicationAlias(getAccount(), param);
View Full Code Here

Examples of com.cloudbees.api.config.ConfigParameters

        // Overwrite appId if blue-green parameter is defined
        try {
            BeesClient client = getAppClient(appId);
            ConfigurationParametersResponse res = client.configurationParameters(appId, "application");
            if (res.getConfiguration() != null) {
                ConfigParameters configParameters = ConfigParameters.parse(res.getConfiguration());
                ParameterMap parameterMap = configParameters.getParameters();

                String param = parameterMap.get("blue-green");

                if (param != null) {
                    ApplicationAlias bgApp = new ApplicationAlias(getAccount(), param);
View Full Code Here

Examples of com.cloudbees.api.config.ConfigParameters

    }

    public static BlueGreenSettings getInstance(BeesClient client, String account, String bgName) throws Exception {
        ConfigurationParametersResponse res = client.configurationParameters(account, "global");
        if (res.getConfiguration() != null) {
            ConfigParameters configParameters = ConfigParameters.parse(res.getConfiguration());
            ParameterMap parameterMap = configParameters.getParameters();

            String param = parameterMap.get(".bg.deploy." + bgName);

            if (param != null) {
                return new BlueGreenSettings(account, param);
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

   
    public static void main(String[] args) throws Exception {
        Logger.getRootLogger().setLevel(Level.ALL);
        RepositoryExplorer explorer = new RepositoryExplorer();
        explorer.setSvnClientProvider(new SvnkitSvnClientProvider());
        ExtractedData data = explorer.explore(new ConfigParameters()
            .setRepoUrl("http://soft-sizo.svn.sourceforge.net/svnroot/soft-sizo/trunk")
            .setToRevision(3));
        Collection<VersionedFile> files = data.getFiles();
        int initialLoc = 0;
        int currentLoc = 0;
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

    @Test
    public void testBuildConfigParameters() throws Exception {
        Options options = ConsoleFrontEnd.buildOptions();
       
        CommandLineParser parser = new GnuParser();
        ConfigParameters configParameters;
        CommandLine commandLine;
       
        commandLine = parser.parse(options, testArgs);
        configParameters = frontEnd
                .buildConfigParameters(commandLine, options);
        assertEquals(15, configParameters.getFromRevision());
        assertEquals(25, configParameters.getToRevision());
        assertEquals("serge", configParameters.getUsername());
        assertEquals("secret", configParameters.getPassword());
        assertEquals("out-dir", configParameters.getOutputDirectory());
        assertEquals("http://myrepo.com", configParameters.getRepoUrl());
        assertEquals("include-me", configParameters.getInclude());
        assertEquals("exclude-me", configParameters.getExclude());
    }
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

    @Test
    public void testPrintVersionFromCommandLine() throws Exception {
        Options options = ConsoleFrontEnd.buildOptions();
       
        CommandLineParser parser = new GnuParser();
        ConfigParameters configParameters;
        CommandLine commandLine;
        String [] args = { "-v" };
        commandLine = parser.parse(options, args);
        configParameters = frontEnd
                .buildConfigParameters(commandLine, options);
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

    @Test
    public void testPrintHelpFromCommandLine() throws Exception {
        Options options = ConsoleFrontEnd.buildOptions();
       
        CommandLineParser parser = new GnuParser();
        ConfigParameters configParameters;
        CommandLine commandLine;
        String [] args = { "-h" };
        commandLine = parser.parse(options, args);
        configParameters = frontEnd
                .buildConfigParameters(commandLine, options);
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

    public void buildConfigParametersDefaultValues() throws Exception{
      String[] args = { "-r", "http://project/svn/trunk" };
      Options options = ConsoleFrontEnd.buildOptions();
       
        CommandLineParser parser = new GnuParser();
        ConfigParameters configParameters;
        CommandLine commandLine;
       
        commandLine = parser.parse(options, args);
        configParameters = frontEnd
                .buildConfigParameters(commandLine, options);
        assertEquals(ConfigParameters.INITIAL_REVISION, configParameters.getFromRevision());
        assertEquals(ConfigParameters.HEAD_REVISION, configParameters.getToRevision());
        assertNull(configParameters.getUsername());
        assertEquals("", configParameters.getPassword());
        assertEquals(ConfigParameters.OUTPUT_DIRECTORY_DEFAULT,
            configParameters.getOutputDirectory());
        assertEquals("http://project/svn/trunk", configParameters.getRepoUrl());       
    }
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

        Logger.getRootLogger().setLevel(Level.OFF);
    }
   
    @Before
    public void setConfigParameters() {
        config = new ConfigParameters()
            .setRepoUrl("http://project.com/svnroot/trunk/src")
            .setFromRevision(30)
            .setToRevision(40);   
    }
View Full Code Here

Examples of com.softsizo.data.ConfigParameters

      return null;
    }else if(cmd.hasOption("v")){
      printVersion();
      return null;
    }
    ConfigParameters config = new ConfigParameters();
    if(cmd.hasOption("f")){
      config.setFromRevision(new Integer(options.getOption("f").getValue()));
    }
    if(cmd.hasOption("t")){
      config.setToRevision(new Integer(options.getOption("t").getValue()));
    }
    if(cmd.hasOption("u")){
      config.setUsername(options.getOption("u").getValue());
    }
    if(cmd.hasOption("p")){
      config.setPassword(options.getOption("p").getValue());
    }
    if(cmd.hasOption("o")){
      config.setOutputDirectory(options.getOption("o").getValue());
    }
    if(cmd.hasOption("e")){
            config.setExclude(options.getOption("e").getValue());
        }
    if(cmd.hasOption("i")){
            config.setInclude(options.getOption("i").getValue());
        }
    config.setRepoUrl(options.getOption("r").getValue());
    return config;
  }
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.