File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 33
44pipeline = 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+
612plugins = [
713 { "docker#v5.11.0" : { image : "buildkite-sdk-tools:latest" } }
814]
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
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ def pipeline = new Pipeline()
55
66pipeline. 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()
You can’t perform that action at this time.
0 commit comments