Skip to content

jmigueprieto/conductor-worker-dsl

 
 

Repository files navigation

Groovy Client DSL

This project provides a DSL inspired in Gradle and Jenkins Pipelines to write Conductor clients.

Here's a sample worker:

@GrabResolver(name='orkes-repo', root='https://orkes-artifacts-repo.s3.amazonaws.com/releases', m2Compatible='true')
@Grab("io.orkes.conductor:groovy-dsl-client:0.2.0")
import static io.orkes.client.dsl.Worker.worker
import com.netflix.conductor.common.metadata.tasks.TaskResult

worker {
    rootUri 'https://play.orkes.io/api/'
    name 'hello_world_worker'
    keyId '_CHANGE_ME_' // Create an Application and Access Key on Conductor UI
    secret '_CHANGE_ME_'
    start {
        println('Hello World!')
        TaskResult.complete()
    }
}

To run this worker (assuming you have Groovy 3.0.x installed) you can execute:

groovy hello-world-worker.groovy

About

A Netflix Conductor Worker DSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 100.0%