Exemplo n.º 1
0
 protected string NegotiateProjectName(string projectName, Branch branch)
 {
     if(branch != null && !branch.IsMaster && !string.IsNullOrEmpty(branch.Name))
         return string.Format(ConfigurationSettings.AppSettings["BuildProjectNameFormat"], projectName, branch.Name);
     else
         return projectName;
 }
Exemplo n.º 2
0
 protected string NegotiateProjectName(string projectName, Branch branch)
 {
     if(branch != null && !branch.IsMaster && !string.IsNullOrEmpty(branch.Name))
         return string.Concat(projectName, "/", branch.Name);
     else
         return projectName;
 }
Exemplo n.º 3
0
        public override void ForceBuild(string projectName, Branch branch)
        {
            projectName = NegotiateProjectName(projectName, branch);

            HttpWebRequest wr = WebRequest.Create(string.Concat(Url, "/ViewFarmReport.aspx")) as HttpWebRequest;
            wr.Method = "post";
            wr.ContentType = "application/x-www-form-urlencoded";
            if (this.Credentials != null)
                wr.Credentials = this.Credentials;

            string body = string.Format("ForceBuild=true&projectName={0}&serverName={1}", projectName, this.Server);
            byte[] bodyBytes = Encoding.UTF8.GetBytes(body);
            wr.ContentLength = bodyBytes.Length;
            using (var dataStream = wr.GetRequestStream())
            {
                dataStream.Write(bodyBytes, 0, bodyBytes.Length);
                dataStream.Close();
            }
            wr.GetResponse();
        }
Exemplo n.º 4
0
 public override void ForceBuild(string projectName, Branch branch)
 {
     projectName = NegotiateProjectName(projectName, branch);
     Open("/ViewFarmReport.aspx").Request(projectName, new IntegrationRequest(BuildCondition.ForceBuild, Source, User));
 }
Exemplo n.º 5
0
 public abstract void ForceBuild(string projectName, Branch branch);