コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JenkinsJob"/> class.
 /// </summary>
 /// <param name="jenkinsConnection">the jenkins connection</param>
 /// <param name="model">the model (e.g. hudson.model.FreeStyleProject)</param>
 /// <param name="name">the name</param>
 public JenkinsJob(IJenkinsConnection jenkinsConnection, string model, string name)
     : base(
         jenkinsConnection,
         model,
         name,
         string.Format("/checkJobName?value={0}", name),
         string.Format("/createItem?name={0}&mode={1}", name, model),
         string.Format("/job/{0}/doDelete", name),
         string.Format("/job/{0}/buildWithParameters", name))
 {
 }
コード例 #2
0
 public JenkinsViewTests()
 {
     if (bool.Parse(ConfigurationManager.AppSettings["UseFakeConnection"] ?? "false"))
     {
         this.jenkinsConnection = new FakeConnection();
     }
     else
     {
         this.jenkinsConnection = new JenkinsConnection(ConfigurationManager.AppSettings["JenkinsURL"]);
     }
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JenkinsView"/> class.
 /// </summary>
 /// <param name="jenkinsConnection">The jenkinsConnection<see cref="IJenkinsConnection"/></param>
 /// <param name="model">The model<see cref="string"/> (e.g. hudson.model.ListView)</param>
 /// <param name="name">The name<see cref="string"/></param>
 public JenkinsView(IJenkinsConnection jenkinsConnection, string model, string name)
     : base(
         jenkinsConnection,
         model,
         name,
         string.Format("/viewExistsCheck?value={0}", name),
         string.Format("/createView?name={0}&mode={1}", name, model),
         string.Format("/view/{0}/doDelete", name),
         string.Format("/job/{0}/buildWithParameters", name))
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JenkinsItem"/> class.
 /// </summary>
 /// <param name="jenkinsConnection">The jenkinsConnection<see cref="IJenkinsConnection"/></param>
 /// <param name="model">The model<see cref="string"/></param>
 /// <param name="name">The name<see cref="string"/></param>
 /// <param name="existsCommand">The command for exist check<see cref="string"/></param>
 /// <param name="createCommand">The command for create<see cref="string"/></param>
 /// <param name="deleteCommand">The command for delete<see cref="string"/></param>
 /// <param name="buildcommand">The command for build<see cref="string"/></param>
 protected JenkinsItem(
     IJenkinsConnection jenkinsConnection,
     string model,
     string name,
     string existsCommand,
     string createCommand,
     string deleteCommand,
     string buildCommand)
 {
     this.JenkinsConnection = jenkinsConnection;
     this.Model             = model;
     this.Name          = name;
     this.existsCommand = existsCommand;
     this.createCommand = createCommand;
     this.deleteCommand = deleteCommand;
     this.buildCommand  = buildCommand;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JenkinsServer"/> class.
 /// </summary>
 /// <param name="jenkinsConnection">The jenkinsConnection<see cref="IJenkinsConnection"/></param>
 public JenkinsServer(IJenkinsConnection jenkinsConnection)
 {
     this.jenkinsConnection = jenkinsConnection;
 }