Starting to scope out a simple Travis CI processor
I need something to generate some simple tasks to pump into the eventbus for the auctioneer, this will have to do
This commit is contained in:
parent
22fef36da9
commit
c93be57709
|
@ -1999,6 +1999,10 @@ dependencies = [
|
||||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "travis-ci"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "trust-dns-proto"
|
name = "trust-dns-proto"
|
||||||
version = "0.18.0-alpha.2"
|
version = "0.18.0-alpha.2"
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
members = [
|
members = [
|
||||||
"auctioneer",
|
"auctioneer",
|
||||||
"eventbus",
|
"eventbus",
|
||||||
|
"processors/travis-ci",
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
= Otto Processors
|
||||||
|
|
||||||
|
|
||||||
|
Processors in Otto take configuration files, e.g. `.travis-ci.yml`,
|
||||||
|
`Jenkinsfile`, and convert them into the internal Otto constructs necessary for
|
||||||
|
task execution.
|
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "travis-ci"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["R. Tyler Croy <rtyler@brokenco.de>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
|
@ -0,0 +1,41 @@
|
||||||
|
#
|
||||||
|
# This is an example of what the example.yml should convert to in terms of
|
||||||
|
# Otto's internal task execution structure
|
||||||
|
#
|
||||||
|
---
|
||||||
|
meta:
|
||||||
|
# Tasks are a discrete higher level concept, which can be mapped to resources
|
||||||
|
# for execution
|
||||||
|
tasks:
|
||||||
|
- id: 0x1
|
||||||
|
capabilities:
|
||||||
|
# "sudo false" basically means that the Travis workload doens't need a full
|
||||||
|
# virtual machine in order to operate
|
||||||
|
docker_run: true
|
||||||
|
# Operations should all exist in a single task and therefore run on a
|
||||||
|
# single colocated resource that has been allocated underneath
|
||||||
|
ops:
|
||||||
|
- id: 1
|
||||||
|
# Contexts are typically going to carry environment variables and other
|
||||||
|
# things, in the simple Travis CI example, there's really a single
|
||||||
|
# "stage" (to use Jenkins terms) in which all scripts will be executed
|
||||||
|
type: BEGINCTX
|
||||||
|
data:
|
||||||
|
name: 'Travis'
|
||||||
|
- id: 2
|
||||||
|
type: RUNPROC
|
||||||
|
data:
|
||||||
|
script: 'echo "Hello World"'
|
||||||
|
env:
|
||||||
|
# The Travis processor should set a default timeout
|
||||||
|
timeout_s: 300
|
||||||
|
- id: 3
|
||||||
|
type: RUNPROC
|
||||||
|
data:
|
||||||
|
script: 'env'
|
||||||
|
env:
|
||||||
|
timeout_s: 300
|
||||||
|
- id: 4
|
||||||
|
type: ENDCTX
|
||||||
|
data:
|
||||||
|
name: 'Travis'
|
|
@ -0,0 +1,10 @@
|
||||||
|
#
|
||||||
|
# This is an example of a _very_ simple .travis-ci.yml file.
|
||||||
|
|
||||||
|
---
|
||||||
|
sudo: false
|
||||||
|
script:
|
||||||
|
- echo "Hello World"
|
||||||
|
- env
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in New Issue