From 31427edfa87cab66937a72cccc7af4396037b779 Mon Sep 17 00:00:00 2001 From: Ember Arlynx Date: Mon, 22 Jun 2020 21:23:46 -0700 Subject: [PATCH 1/3] flatten dhall filesystem by one directory --- buildkite/src/Jobs/CheckDhall.dhall | 39 +++++++++++++++ buildkite/src/Jobs/CheckDhall/Pipeline.dhall | 25 ---------- buildkite/src/Jobs/CheckDhall/Spec.dhall | 17 ------- buildkite/src/Jobs/ClientSdk.dhall | 52 ++++++++++++++++++++ buildkite/src/Jobs/ClientSdk/Pipeline.dhall | 38 -------------- buildkite/src/Jobs/ClientSdk/Spec.dhall | 18 ------- buildkite/src/Jobs/Lint/Fast.dhall | 40 +++++++++++++++ buildkite/src/Jobs/Lint/Fast/Pipeline.dhall | 35 ------------- buildkite/src/Jobs/Lint/Fast/Spec.dhall | 10 ---- buildkite/src/Jobs/Lint/OCaml.dhall | 44 +++++++++++++++++ buildkite/src/Jobs/Lint/OCaml/Pipeline.dhall | 28 ----------- buildkite/src/Jobs/Lint/OCaml/Spec.dhall | 17 ------- buildkite/src/Jobs/Sample.dhall | 27 ++++++++++ buildkite/src/Jobs/Sample/Pipeline.dhall | 22 --------- buildkite/src/Jobs/Sample/Spec.dhall | 9 ---- buildkite/src/Jobs/Sample2.dhall | 27 ++++++++++ buildkite/src/Jobs/Sample2/Pipeline.dhall | 22 --------- buildkite/src/Jobs/Sample2/Spec.dhall | 9 ---- 18 files changed, 229 insertions(+), 250 deletions(-) create mode 100644 buildkite/src/Jobs/CheckDhall.dhall delete mode 100644 buildkite/src/Jobs/CheckDhall/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/CheckDhall/Spec.dhall create mode 100644 buildkite/src/Jobs/ClientSdk.dhall delete mode 100644 buildkite/src/Jobs/ClientSdk/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/ClientSdk/Spec.dhall create mode 100644 buildkite/src/Jobs/Lint/Fast.dhall delete mode 100644 buildkite/src/Jobs/Lint/Fast/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/Lint/Fast/Spec.dhall create mode 100644 buildkite/src/Jobs/Lint/OCaml.dhall delete mode 100644 buildkite/src/Jobs/Lint/OCaml/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/Lint/OCaml/Spec.dhall create mode 100644 buildkite/src/Jobs/Sample.dhall delete mode 100644 buildkite/src/Jobs/Sample/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/Sample/Spec.dhall create mode 100644 buildkite/src/Jobs/Sample2.dhall delete mode 100644 buildkite/src/Jobs/Sample2/Pipeline.dhall delete mode 100644 buildkite/src/Jobs/Sample2/Spec.dhall diff --git a/buildkite/src/Jobs/CheckDhall.dhall b/buildkite/src/Jobs/CheckDhall.dhall new file mode 100644 index 00000000000..7af8bb382ab --- /dev/null +++ b/buildkite/src/Jobs/CheckDhall.dhall @@ -0,0 +1,39 @@ +let S = ../Lib/SelectFiles.dhall +let D = S.PathPattern + +let JobSpec = ../Pipeline/JobSpec.dhall +let Pipeline = ../Pipeline/Dsl.dhall +let Command = ../Command/Base.dhall +let Docker = ../Command/Docker/Type.dhall +let Size = ../Command/Size.dhall + +let Cmd = ../Lib/Cmds.dhall + +in + +Pipeline.build + Pipeline.Config::{ + spec = JobSpec::{ + dirtyWhen = [ + S.strictly (S::{ + dir = Some [D.Lit "buildkite/", D.Any], + exts = Some ["dhall"] + }), + S.strictly (S.contains "buildkite/Makefile"), + S.exactly "buildkite/scripts/generate-jobs" "sh" + ], + name = "CheckDhall" + }, + steps = [ + Command.build + Command.Config::{ + commands = [ + Cmd.run "cd buildkite && make check" + ], + label = "Check all CI Dhall entrypoints", + key = "check", + target = Size.Small, + docker = Some Docker::{ image = (../Constants/ContainerImages.dhall).toolchainBase } + } + ] + } diff --git a/buildkite/src/Jobs/CheckDhall/Pipeline.dhall b/buildkite/src/Jobs/CheckDhall/Pipeline.dhall deleted file mode 100644 index 67fe34e13f6..00000000000 --- a/buildkite/src/Jobs/CheckDhall/Pipeline.dhall +++ /dev/null @@ -1,25 +0,0 @@ -let Pipeline = ../../Pipeline/Dsl.dhall -let Command = ../../Command/Base.dhall -let Docker = ../../Command/Docker/Type.dhall -let Size = ../../Command/Size.dhall - -let Cmd = ../../Lib/Cmds.dhall - -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command.build - Command.Config::{ - commands = [ - Cmd.run "cd buildkite && make check" - ], - label = "Check all CI Dhall entrypoints", - key = "check", - target = Size.Small, - docker = Some Docker::{ image = (../../Constants/ContainerImages.dhall).toolchainBase } - } - ] - } diff --git a/buildkite/src/Jobs/CheckDhall/Spec.dhall b/buildkite/src/Jobs/CheckDhall/Spec.dhall deleted file mode 100644 index f7970d69f21..00000000000 --- a/buildkite/src/Jobs/CheckDhall/Spec.dhall +++ /dev/null @@ -1,17 +0,0 @@ -let S = ../../Lib/SelectFiles.dhall -let D = S.PathPattern - -let JobSpec = ../../Pipeline/JobSpec.dhall - -in -JobSpec::{ - dirtyWhen = [ - S.strictly (S::{ - dir = Some [D.Lit "buildkite/", D.Any], - exts = Some ["dhall"] - }), - S.strictly (S.contains "buildkite/Makefile"), - S.exactly "buildkite/scripts/generate-jobs" "sh" - ], - name = "CheckDhall" -} diff --git a/buildkite/src/Jobs/ClientSdk.dhall b/buildkite/src/Jobs/ClientSdk.dhall new file mode 100644 index 00000000000..644e640dff5 --- /dev/null +++ b/buildkite/src/Jobs/ClientSdk.dhall @@ -0,0 +1,52 @@ +let Prelude = ../External/Prelude.dhall +let S = ../Lib/SelectFiles.dhall + +let Cmd = ../Lib/Cmds.dhall + +let Pipeline = ../Pipeline/Dsl.dhall +let Command = ../Command/Base.dhall +let OpamInit = ../Command/OpamInit.dhall +let Docker = ../Command/Docker/Type.dhall +let Size = ../Command/Size.dhall +let JobSpec = ../Pipeline/JobSpec.dhall + +in + +Pipeline.build + Pipeline.Config::{ + spec = + let opamDirtyWhen = [ + S.exactly "src/opam" "export", + S.exactly "scripts/setup-opam" "sh", + S.strictly (S.contains "Makefile") + ] + in + JobSpec::{ + dirtyWhen = opamDirtyWhen # [ + S.strictlyStart (S.contains "buildkite/src/Jobs/ClientSdk"), + S.strictlyStart (S.contains "src") + ], + name = "ClientSdk" + }, + steps = [ + Command.build + Command.Config::{ + commands = OpamInit.commands # [ + Cmd.runInDocker + Cmd.Docker::{ + image = (../../Constants/ContainerImages.dhall).codaToolchain + } + ("mkdir -p /tmp/artifacts && (" ++ + "set -o pipefail ; " ++ + "./buildkite/scripts/opam-env.sh && " ++ + "make client_sdk 2>&1 | tee /tmp/artifacts/buildclientsdk.log" ++ + ")") + ], + label = "Build client-sdk", + key = "build-client-sdk", + target = Size.Large, + docker = None Docker.Type + } + ] + } + diff --git a/buildkite/src/Jobs/ClientSdk/Pipeline.dhall b/buildkite/src/Jobs/ClientSdk/Pipeline.dhall deleted file mode 100644 index db3923aa4c1..00000000000 --- a/buildkite/src/Jobs/ClientSdk/Pipeline.dhall +++ /dev/null @@ -1,38 +0,0 @@ -let Prelude = ../../External/Prelude.dhall - -let Cmd = ../../Lib/Cmds.dhall - -let Pipeline = ../../Pipeline/Dsl.dhall -let Command = ../../Command/Base.dhall -let OpamInit = ../../Command/OpamInit.dhall -let Docker = ../../Command/Docker/Type.dhall -let Size = ../../Command/Size.dhall -let JobSpec = ../../Pipeline/JobSpec.dhall - -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command.build - Command.Config::{ - commands = OpamInit.commands # [ - Cmd.runInDocker - Cmd.Docker::{ - image = (../../Constants/ContainerImages.dhall).codaToolchain - } - ("mkdir -p /tmp/artifacts && (" ++ - "set -o pipefail ; " ++ - "./buildkite/scripts/opam-env.sh && " ++ - "make client_sdk 2>&1 | tee /tmp/artifacts/buildclientsdk.log" ++ - ")") - ], - label = "Build client-sdk", - key = "build-client-sdk", - target = Size.Large, - docker = None Docker.Type - } - ] - } - diff --git a/buildkite/src/Jobs/ClientSdk/Spec.dhall b/buildkite/src/Jobs/ClientSdk/Spec.dhall deleted file mode 100644 index 176b2878f08..00000000000 --- a/buildkite/src/Jobs/ClientSdk/Spec.dhall +++ /dev/null @@ -1,18 +0,0 @@ -let S = ../../Lib/SelectFiles.dhall - -let JobSpec = ../../Pipeline/JobSpec.dhall - -let opamDirtyWhen = [ - S.exactly "src/opam" "export", - S.exactly "scripts/setup-opam" "sh", - S.strictly (S.contains "Makefile") - ] - -in -JobSpec::{ - dirtyWhen = opamDirtyWhen # [ - S.strictlyStart (S.contains "buildkite/src/Jobs/ClientSdk"), - S.strictlyStart (S.contains "src") - ], - name = "ClientSdk" -} diff --git a/buildkite/src/Jobs/Lint/Fast.dhall b/buildkite/src/Jobs/Lint/Fast.dhall new file mode 100644 index 00000000000..c30cd9e3309 --- /dev/null +++ b/buildkite/src/Jobs/Lint/Fast.dhall @@ -0,0 +1,40 @@ +let Prelude = ../../External/Prelude.dhall + +let S = ../../Lib/SelectFiles.dhall +let Cmd = ../../Lib/Cmds.dhall + +let Pipeline = ../../Pipeline/Dsl.dhall +let Command = ../../Command/Base.dhall +let Docker = ../../Command/Docker/Type.dhall +let Size = ../../Command/Size.dhall +let JobSpec = ../../Pipeline/JobSpec.dhall + +let commands = + [ + Cmd.run "./scripts/lint_codeowners.sh", + Cmd.run "./scripts/lint_rfcs.sh", + Cmd.run "make check-snarky-submodule", + Cmd.run "./scripts/lint_preprocessor_deps.sh" + ] + +in + +Pipeline.build + Pipeline.Config::{ + spec = JobSpec::{ + dirtyWhen = [ S.everything ], + path = "Lint", + name = "Fast" + }, + steps = [ + Command.build + Command.Config::{ + commands = commands, + label = "Fast lint steps; CODEOWNERs, RFCs, Check Snarky Submodule, Preprocessor Deps", + key = "lint", + target = Size.Small, + docker = Some Docker::{ image = (../../Constants/ContainerImages.dhall).toolchainBase } + } + ] + } + diff --git a/buildkite/src/Jobs/Lint/Fast/Pipeline.dhall b/buildkite/src/Jobs/Lint/Fast/Pipeline.dhall deleted file mode 100644 index 98df1b51f5b..00000000000 --- a/buildkite/src/Jobs/Lint/Fast/Pipeline.dhall +++ /dev/null @@ -1,35 +0,0 @@ -let Prelude = ../../../External/Prelude.dhall - -let Cmd = ../../../Lib/Cmds.dhall - -let Pipeline = ../../../Pipeline/Dsl.dhall -let Command = ../../../Command/Base.dhall -let Docker = ../../../Command/Docker/Type.dhall -let Size = ../../../Command/Size.dhall -let JobSpec = ../../../Pipeline/JobSpec.dhall - -let commands = - [ - Cmd.run "./scripts/lint_codeowners.sh", - Cmd.run "./scripts/lint_rfcs.sh", - Cmd.run "make check-snarky-submodule", - Cmd.run "./scripts/lint_preprocessor_deps.sh" - ] - -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command.build - Command.Config::{ - commands = commands, - label = "Fast lint steps; CODEOWNERs, RFCs, Check Snarky Submodule, Preprocessor Deps", - key = "lint", - target = Size.Small, - docker = Some Docker::{ image = (../../../Constants/ContainerImages.dhall).toolchainBase } - } - ] - } - diff --git a/buildkite/src/Jobs/Lint/Fast/Spec.dhall b/buildkite/src/Jobs/Lint/Fast/Spec.dhall deleted file mode 100644 index 23b0388c84b..00000000000 --- a/buildkite/src/Jobs/Lint/Fast/Spec.dhall +++ /dev/null @@ -1,10 +0,0 @@ -let SelectFiles = ../../../Lib/SelectFiles.dhall - -let JobSpec = ../../../Pipeline/JobSpec.dhall - -in -JobSpec::{ - dirtyWhen = [ SelectFiles.everything ], - path = "Lint", - name = "Fast" -} diff --git a/buildkite/src/Jobs/Lint/OCaml.dhall b/buildkite/src/Jobs/Lint/OCaml.dhall new file mode 100644 index 00000000000..9ab6a4ce88d --- /dev/null +++ b/buildkite/src/Jobs/Lint/OCaml.dhall @@ -0,0 +1,44 @@ +let Prelude = ../../External/Prelude.dhall + +let S = ../../Lib/SelectFiles.dhall +let JobSpec = ../../Pipeline/JobSpec.dhall + +let Cmd = ../../Lib/Cmds.dhall + +let Pipeline = ../../Pipeline/Dsl.dhall +let Command/Coda = ../../Command/Coda.dhall +let Docker = ../../Command/Docker/Type.dhall +let Size = ../../Command/Size.dhall + +let commands = + [ + Cmd.run "eval $$(opam config env) && make check-format", + Cmd.run "./scripts/require-ppx-version.py" + ] +in + +Pipeline.build + Pipeline.Config::{ + spec = + let + dirtyDhallDir = S.strictlyStart (S.contains "buildkite/src/Jobs/Lint/OCaml") + let + dirtyDhallDirCompiles = assert : S.compile [dirtyDhallDir] === "^buildkite/src/Jobs/Lint/OCaml" + in + JobSpec::{ + dirtyWhen = [ + dirtyDhallDir, + S.strictlyStart (S.contains "src/") + ], + path = "Lint", + name = "OCaml" + }, + steps = [ + Command/Coda.build + Command/Coda.Config::{ + commands = commands, + label = "OCaml Lints; Check-format, Require-ppx-version", + key = "check" + } + ] + } diff --git a/buildkite/src/Jobs/Lint/OCaml/Pipeline.dhall b/buildkite/src/Jobs/Lint/OCaml/Pipeline.dhall deleted file mode 100644 index 0f13c7e00ad..00000000000 --- a/buildkite/src/Jobs/Lint/OCaml/Pipeline.dhall +++ /dev/null @@ -1,28 +0,0 @@ -let Prelude = ../../../External/Prelude.dhall - -let Cmd = ../../../Lib/Cmds.dhall - -let Pipeline = ../../../Pipeline/Dsl.dhall -let Command/Coda = ../../../Command/Coda.dhall -let Docker = ../../../Command/Docker/Type.dhall -let Size = ../../../Command/Size.dhall - -let commands = - [ - Cmd.run "eval $$(opam config env) && make check-format", - Cmd.run "./scripts/require-ppx-version.py" - ] -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command/Coda.build - Command/Coda.Config::{ - commands = commands, - label = "OCaml Lints; Check-format, Require-ppx-version", - key = "check" - } - ] - } diff --git a/buildkite/src/Jobs/Lint/OCaml/Spec.dhall b/buildkite/src/Jobs/Lint/OCaml/Spec.dhall deleted file mode 100644 index f554a280c00..00000000000 --- a/buildkite/src/Jobs/Lint/OCaml/Spec.dhall +++ /dev/null @@ -1,17 +0,0 @@ -let S = ../../../Lib/SelectFiles.dhall -let JobSpec = ../../../Pipeline/JobSpec.dhall - -let dirtyDhallDir = S.strictlyStart (S.contains "buildkite/src/Jobs/Lint/OCaml") -let dirtyDhallDirCompiles = assert : S.compile [dirtyDhallDir] === "^buildkite/src/Jobs/Lint/OCaml" - -in - -JobSpec::{ - dirtyWhen = [ - dirtyDhallDir, - S.strictlyStart (S.contains "src/") - ], - path = "Lint", - name = "OCaml" -} - diff --git a/buildkite/src/Jobs/Sample.dhall b/buildkite/src/Jobs/Sample.dhall new file mode 100644 index 00000000000..8a5fceafb75 --- /dev/null +++ b/buildkite/src/Jobs/Sample.dhall @@ -0,0 +1,27 @@ +let Cmd = ../Lib/Cmds.dhall + +let S = ../Lib/SelectFiles.dhall + +let Pipeline = ../Pipeline/Dsl.dhall +let Command = ../Command/Base.dhall +let Docker = ../Command/Docker/Type.dhall +let Size = ../Command/Size.dhall + +in + +Pipeline.build + Pipeline.Config::{ + spec = JobSpec::{ + dirtyWhen = [ S.contains "transition" ], + name = "Sample" + }, + steps = [ + Command.build + Command.Config::{ + commands = [ Cmd.run "echo \"hello\"" ], + label = "Test Echo", key = "hello", + target = Size.Small, + docker = Some Docker::{ image = (../Constants/ContainerImages.dhall).toolchainBase } + } + ] + } diff --git a/buildkite/src/Jobs/Sample/Pipeline.dhall b/buildkite/src/Jobs/Sample/Pipeline.dhall deleted file mode 100644 index 650a3143610..00000000000 --- a/buildkite/src/Jobs/Sample/Pipeline.dhall +++ /dev/null @@ -1,22 +0,0 @@ -let Cmd = ../../Lib/Cmds.dhall - -let Pipeline = ../../Pipeline/Dsl.dhall -let Command = ../../Command/Base.dhall -let Docker = ../../Command/Docker/Type.dhall -let Size = ../../Command/Size.dhall - -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command.build - Command.Config::{ - commands = [ Cmd.run "echo \"hello\"" ], - label = "Test Echo", key = "hello", - target = Size.Small, - docker = Some Docker::{ image = (../../Constants/ContainerImages.dhall).toolchainBase } - } - ] - } diff --git a/buildkite/src/Jobs/Sample/Spec.dhall b/buildkite/src/Jobs/Sample/Spec.dhall deleted file mode 100644 index 77df798c049..00000000000 --- a/buildkite/src/Jobs/Sample/Spec.dhall +++ /dev/null @@ -1,9 +0,0 @@ -let SelectFiles = ../../Lib/SelectFiles.dhall - -let JobSpec = ../../Pipeline/JobSpec.dhall - -in -JobSpec::{ - dirtyWhen = [ SelectFiles.contains "transition" ], - name = "Sample" -} diff --git a/buildkite/src/Jobs/Sample2.dhall b/buildkite/src/Jobs/Sample2.dhall new file mode 100644 index 00000000000..4c34494a3bc --- /dev/null +++ b/buildkite/src/Jobs/Sample2.dhall @@ -0,0 +1,27 @@ +let Cmd = ../Lib/Cmds.dhall + +let S = ../Lib/SelectFiles.dhall + +let Pipeline = ../Pipeline/Dsl.dhall +let Command = ../Command/Base.dhall +let Docker = ../Command/Docker/Type.dhall +let Size = ../Command/Size.dhall + +in + +Pipeline.build + Pipeline.Config::{ + spec = JobSpec::{ + dirtyWhen = [ S.contains "src/lib" ], + name = "Sample2" + }, + steps = [ + Command.build + Command.Config::{ + commands = [ Cmd.run "echo \"hello2\"" ], + label = "Test Echo2", key = "hello2", + target = Size.Small, + docker = Some Docker::{ image = (../Constants/ContainerImages.dhall).toolchainBase } + } + ] + } diff --git a/buildkite/src/Jobs/Sample2/Pipeline.dhall b/buildkite/src/Jobs/Sample2/Pipeline.dhall deleted file mode 100644 index 1847ecffdb1..00000000000 --- a/buildkite/src/Jobs/Sample2/Pipeline.dhall +++ /dev/null @@ -1,22 +0,0 @@ -let Cmd = ../../Lib/Cmds.dhall - -let Pipeline = ../../Pipeline/Dsl.dhall -let Command = ../../Command/Base.dhall -let Docker = ../../Command/Docker/Type.dhall -let Size = ../../Command/Size.dhall - -in - -Pipeline.build - Pipeline.Config::{ - spec = ./Spec.dhall, - steps = [ - Command.build - Command.Config::{ - commands = [ Cmd.run "echo \"hello2\"" ], - label = "Test Echo2", key = "hello2", - target = Size.Small, - docker = Some Docker::{ image = (../../Constants/ContainerImages.dhall).toolchainBase } - } - ] - } diff --git a/buildkite/src/Jobs/Sample2/Spec.dhall b/buildkite/src/Jobs/Sample2/Spec.dhall deleted file mode 100644 index 3d05950e9c5..00000000000 --- a/buildkite/src/Jobs/Sample2/Spec.dhall +++ /dev/null @@ -1,9 +0,0 @@ -let SelectFiles = ../../Lib/SelectFiles.dhall - -let JobSpec = ../../Pipeline/JobSpec.dhall - -in -JobSpec::{ - dirtyWhen = [ SelectFiles.contains "src/lib" ], - name = "Sample2" -} From ebe5db36f0adeb68e8fbe0297700f24bd7bb8160 Mon Sep 17 00:00:00 2001 From: Ember Arlynx Date: Mon, 22 Jun 2020 21:41:03 -0700 Subject: [PATCH 2/3] forget about Pipeline files --- buildkite/Makefile | 2 +- buildkite/src/Monorepo.dhall | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildkite/Makefile b/buildkite/Makefile index 7acae643e1a..c87c77aa00c 100644 --- a/buildkite/Makefile +++ b/buildkite/Makefile @@ -4,4 +4,4 @@ check: dhall --file './src/Monorepo.dhall' # globstar doesn't work on macOS bash :facepalm:, so we can't glob # xargs will short-circuit if a command fails with code 255 - find ./src/Jobs/ -name "Pipeline.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'dhall --file {} || exit 255' + find ./src/Jobs/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'dhall --file {} || exit 255' diff --git a/buildkite/src/Monorepo.dhall b/buildkite/src/Monorepo.dhall index 842cb0013fb..8f1e1bbf965 100644 --- a/buildkite/src/Monorepo.dhall +++ b/buildkite/src/Monorepo.dhall @@ -15,7 +15,7 @@ let jobs : List JobSpec.Type = ./gen/Jobs.dhall -- Run a job if we touched a dirty path let makeCommand : JobSpec.Type -> Cmd.Type = \(job : JobSpec.Type) -> let dirtyWhen = SelectFiles.compile job.dirtyWhen - let trigger = triggerCommand "src/Jobs/${job.path}/${job.name}/Pipeline.dhall" + let trigger = triggerCommand "src/Jobs/${job.path}/${job.name}.dhall" in Cmd.quietly '' if cat _computed_diff.txt | egrep -q '${dirtyWhen}'; then echo "Triggering ${job.name} for reason:" From 7b3ad584db45b4fcf014641774ca0840a64f740d Mon Sep 17 00:00:00 2001 From: Ember Arlynx Date: Mon, 22 Jun 2020 21:42:34 -0700 Subject: [PATCH 3/3] buildkite: rust lint (old tracetool job) --- buildkite/src/Jobs/Lint/Rust.dhall | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 buildkite/src/Jobs/Lint/Rust.dhall diff --git a/buildkite/src/Jobs/Lint/Rust.dhall b/buildkite/src/Jobs/Lint/Rust.dhall new file mode 100644 index 00000000000..7ddeb21c46b --- /dev/null +++ b/buildkite/src/Jobs/Lint/Rust.dhall @@ -0,0 +1,30 @@ +let Prelude = ../../External/Prelude.dhall + +let S = ../../Lib/SelectFiles.dhall +let Cmd = ../../Lib/Cmds.dhall + +let Pipeline = ../../Pipeline/Dsl.dhall +let Command = ../../Command/Base.dhall +let Docker = ../../Command/Docker/Type.dhall +let Size = ../../Command/Size.dhall +let JobSpec = ../../Pipeline/JobSpec.dhall + +Pipeline.build + Pipeline.Config::{ + spec = JobSpec::{ + dirtyWhen = [ S.contains "src/app/trace-tool" ], + path = "Lint", + name = "Rust" + }, + steps = [ + Command.build + Command.Config::{ + commands = [ Cmd.run "cd src/app/trace-tool ; cargo check --frozen" ], + label = "Rust lint steps", + key = "lint", + target = Size.Small, + docker = Some Docker::{ image = (../../Constants/ContainerImages.dhall).toolchainBase } + } + ] + } +