Example #1
0
 public Build(Project project, Commit commit, BuildConfiguration buildConfig)
 {
     State = BuildState.Queued;
     Project = project;
     Commit = commit;
     Created = DateTime.UtcNow;
     Output = new BuildOutput();
     Configuration = buildConfig;
 }
Example #2
0
        /// <summary>
        /// Get a new build job
        /// </summary>
        private static void GetBuild()
        {
            var buildInfo = GitLabAPI.GetBuild();
            if (buildInfo != null)
            {
                var conf = new BuildConfiguration();

                // Create Build Job
                build = new Build() {Info = buildInfo};
                Console.WriteLine("[" + DateTime.Now + "] Build " + buildInfo.Value.id
                    + " started...");

                var thread = new Thread(build.Start);
                thread.Start();
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            var project = new Project { Name = "CppSharp" };
            var repo = new GithubRepository(project)
            {
                Owner = "mono",
                Name = "CppSharp",
                URL = @"https://github.com/mono/CppSharp.git",
                MinRevision = new Commit("cd3e729d3873a845eacee4260480e4c3dfe14579")
            };
            project.Repositories.Add(repo);

            var config = new BuildConfiguration();
            project.Configurations.Add(config);

            var options = new Options
            {
                OutputDir = @"C:\builds\",
                Username = "******",
                Token = "a32086c82fb50fc7acc4b33a5d183e23d4efa997"
            };

            Task.Run((() => LaunchBuildAgent(options)));

            using (var server = new BuildServer(options))
            {
                ConsoleUtils.SetupExitHandler(sig =>
                {
                    server.IsExiting = true;
                    return true;
                });

                server.Projects.Add(project);
                server.RunServer();
            }
        }
Example #4
0
 public Project()
 {
     Repositories = new List<Repository>();
     Configurations = new List<BuildConfiguration>();
     DefaultBuildConfiguration = new BuildConfiguration();
 }