Streams HashiCorp Nomad events to your favorite destinations.
Refer to app.rb for supported environment variables.
Each commit has a Docker image built for it or use ghcr.io/axsuul/nomad-event-streamer:latest
.
bundle
then run tests with
bundle exec rspec
Below are some job files to test failure and success states.
job "oom-killed" {
datacenters = ["dc1"]
type = "service"
group "oom-killed" {
task "oom-task" {
driver = "docker"
env {
NODE_NAME = "${node.unique.name}"
}
config {
image = "zyfdedh/stress"
command = "sh"
args = [
"-c",
"sleep 10; stress --vm 1 --vm-bytes 50M",
]
}
resources {
memory = 15
}
}
}
}
job "exit-zero" {
datacenters = ["dc1"]
type = "batch"
group "exit-zero" {
task "exit-task" {
driver = "docker"
config {
image = "bash"
command = "bash"
args = [
"-c",
"sleep 10; exit 0",
]
}
}
}
}