Ejemplo n.º 1
0
  public static void main(String[] args) {
    JenkinsServer jenkins = null;
    try {
      jenkins = new JenkinsServer(new URI("http://130.211.189.253"), "", "");
      jenkins.createJob(
          "ProgramaticJob", inputStream2String(new FileInputStream(new File("config.xml"))));
    } catch (URISyntaxException | IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    //
    //        try {
    //
    //            // jenkins.createJob(jobName, jobXml);
    //            Map<String, Job> jobs = jenkins.getJobs();
    //            for (String s : jobs.keySet()) {
    //                // System.out.println(s);
    //                System.out.println(jobs.get(s).details().details());
    //            }
    //        } catch (IOException e) {
    //            // TODO Auto-generated catch block
    //            e.printStackTrace();
    //        }

  }