Initial commit with some of the scaffolding I'm expecting to put into place
This commit is contained in:
commit
2f03028f97
|
@ -0,0 +1 @@
|
||||||
|
/target
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,14 @@
|
||||||
|
[package]
|
||||||
|
name = "urci"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["R. Tyler Croy <rtyler@brokenco.de>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
async-std = { version = "~1.6.0", features = ["attributes"] }
|
||||||
|
cron = "~0.6.1"
|
||||||
|
serde = { version = "~1.0.106", features = ["rc"] }
|
||||||
|
serde_derive = "~1.0.106"
|
||||||
|
serde_json = "~1.0.0"
|
||||||
|
serde_yaml = "~0.8.13"
|
||||||
|
tide = "~0.13.0"
|
|
@ -0,0 +1,3 @@
|
||||||
|
= UrCI
|
||||||
|
|
||||||
|
A most primitive CI server built as an exercise.
|
|
@ -0,0 +1,45 @@
|
||||||
|
/**
|
||||||
|
* This module contains all the defined structures which will process the UrCI
|
||||||
|
* configuration file
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Config {
|
||||||
|
pub projects: Vec<Project>,
|
||||||
|
pub agents: Vec<Agent>,
|
||||||
|
pub handlers: Vec<Handler>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Project {
|
||||||
|
name: String,
|
||||||
|
trigger: Trigger,
|
||||||
|
handler: String,
|
||||||
|
scm: Scm,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Trigger {
|
||||||
|
cron: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Scm {
|
||||||
|
git: Option<String>,
|
||||||
|
r#ref: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Agent {
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Handler {
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
mod config;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
# This is an example configuration for urci
|
||||||
|
#
|
||||||
|
---
|
||||||
|
|
||||||
|
projects:
|
||||||
|
- name: hotdog
|
||||||
|
trigger:
|
||||||
|
cron: '*/10 * * * *'
|
||||||
|
# The different types of handlers should be documented elsewhere. In this
|
||||||
|
# case, the project is expected to use a simple .travis-ci.yml
|
||||||
|
handler: travis-ci
|
||||||
|
scm:
|
||||||
|
git: https://github.com/reiseburo/hotdog
|
||||||
|
ref: 'urci'
|
||||||
|
|
||||||
|
# Some agents must be defined in order to actually execute anything
|
||||||
|
agents:
|
||||||
|
- name: main
|
||||||
|
description: |
|
||||||
|
The primary instance running the urci server
|
||||||
|
# The local type can only be defined ones, since it will build projects on
|
||||||
|
# the primary urci server
|
||||||
|
type: local
|
||||||
|
|
||||||
|
- name: freebsd
|
||||||
|
description: |
|
||||||
|
A FreeBSD VM that exists just to run demo builds.
|
||||||
|
type: ssh
|
||||||
|
params:
|
||||||
|
username: 'urci'
|
||||||
|
password: 'urci'
|
||||||
|
hostname: freebsd-for-urci
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
travis-ci:
|
||||||
|
filename: '.travis-ci.yml'
|
||||||
|
defaults:
|
||||||
|
agent: 'main'
|
||||||
|
timeout: 300
|
Loading…
Reference in New Issue