Skip to content

Commit

Permalink
CI: Fix failure in lint steps of new pipeline (#3533)
Browse files Browse the repository at this point in the history
If an agent is reused the STEP_ID can be the same, therefore delete the tmp directory first and recreate it cleanly.
  • Loading branch information
lukedirtwalker authored Dec 17, 2019
1 parent dea07c6 commit 426c9cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ steps:
timeout_in_minutes: 10
- label: "Check generated go_deps.bzl file is up to date with go.mod"
command:
- "mkdir /tmp/$BUILDKITE_STEP_ID/"
- "rm -rf mkdir /tmp/$BUILDKITE_STEP_ID/"
- "mkdir -p /tmp/$BUILDKITE_STEP_ID/"
- "cp go.mod go.sum go_deps.bzl /tmp/$BUILDKITE_STEP_ID/"
- "make godeps -B"
- "bazel-${BUILDKITE_PIPELINE_SLUG}/external/go_sdk/bin/go mod tidy"
Expand All @@ -35,7 +36,8 @@ steps:
- exit_status: 255 # Forced agent shutdown
- label: "Check generated go/proto files in git"
command:
- "mkdir /tmp/$BUILDKITE_STEP_ID/"
- "rm -rf mkdir /tmp/$BUILDKITE_STEP_ID/"
- "mkdir -p /tmp/$BUILDKITE_STEP_ID/"
- "cp -R go/proto/ /tmp/$BUILDKITE_STEP_ID/"
- "make gogen"
- "diff -ur /tmp/$BUILDKITE_STEP_ID/proto/ go/proto/"
Expand Down

0 comments on commit 426c9cc

Please sign in to comment.