Skip to content

Commit 6e3a1e1

Browse files
committed
Try runnning a Groovy-generated step
1 parent 1392556 commit 6e3a1e1

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.buildkite/pipeline.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
pipeline = Buildkite::Pipeline.new
55

6+
is_fork_pr = Environment::BUILDKITE_PULL_REQUEST_REPO != "" && Environment::BUILDKITE_REPO == Environment::BUILDKITE_PULL_REQUEST_REPO
7+
if is_fork_pr
8+
puts pipeline.to_json
9+
exit
10+
end
11+
612
plugins = [
713
{ "docker#v5.11.0": { image: "buildkite-sdk-tools:latest" } }
814
]
@@ -59,13 +65,6 @@
5965
key: "ruby",
6066
sdk_label: "sdk-ruby",
6167
app_label: "app-ruby"
62-
},
63-
{
64-
icon: ":java:",
65-
label: "Groovy",
66-
key: "groovy",
67-
sdk_label: "sdk-groovy",
68-
app_label: "app-groovy"
6968
}
7069
]
7170

apps/groovy/main.groovy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ def pipeline = new Pipeline()
55

66
pipeline.addStep([
77
label: "some-label",
8-
command: "echo 'Hello, world!'"
8+
command: "echo 'Hello, world!'",
99
])
1010

11-
print pipeline.toJSON()
11+
def outputDir = new File("../../out/apps/groovy")
12+
outputDir.mkdirs()
13+
14+
new File(outputDir, "pipeline.json").text = pipeline.toJSON()
15+
new File(outputDir, "pipeline.yaml").text = pipeline.toYAML()

0 commit comments

Comments
 (0)