Ejemplo n.º 1
0
        /// <summary>
        /// 新建JenkinsBuildTask
        /// </summary>
        /// <param name="appName">应用名称</param>
        /// <param name="environment">所属环境</param>
        private static void CreateJkbt(string appName, string environment)
        {
            var createjkbtApiUrl = GetJenkinsConfig("JenkinsCreateBuildTaskApiUrl", "");

            createjkbtApiUrl = String.Format(createjkbtApiUrl, appName, environment,
                                             ConfigManager.GetConfigObject("JenkinsCreateBuildTaskDeplayTime", 0));
            Console.WriteLine($"JenkinsCreateBuildTaskApiUrl:{createjkbtApiUrl}");
            HttpClientUtils.Post(createjkbtApiUrl, new Dictionary <string, string> {
                { "Version", "HEAD" }
            });
        }