Skip to content

Conversation

@cnunciato
Copy link
Contributor

@cnunciato cnunciato commented Apr 5, 2025

Tired of Jenkins, but still love you some Groovy? No problem -- use it with Buildkite! 😄

// main.groovy
import buildkite.Pipeline
import buildkite.StepTypes

def pipeline = new Pipeline()

pipeline.addStep([
    label: "some-label",
    command: "echo 'Hello, world!'"
])

print pipeline.toJSON()
$ groovy -classpath sdk/groovy apps/groovy/main.groovy

{
    "steps": [
        {
            "label": "some-label",
            "command": "echo 'Hello, world!'"
        }
    ]
}
steps:
  - label: ":buildkite: Upload the pipeline"
    command: groovy -classpath sdk/groovy apps/groovy/main.groovy | buildkite-agent pipeline upload

@cnunciato cnunciato force-pushed the cnunciato/groovy branch 6 times, most recently from 6c3e72a to 288f611 Compare April 5, 2025 21:22
@cnunciato cnunciato changed the title Groovy, just for fun Groovy, because why not Apr 5, 2025
@cnunciato cnunciato force-pushed the cnunciato/groovy branch 2 times, most recently from 85fe116 to a080758 Compare April 6, 2025 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants