diff --git a/ci/.gitignore b/ci/.gitignore new file mode 100644 index 0000000000..936e5c57af --- /dev/null +++ b/ci/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/package-lock.json diff --git a/ci/run-local.sh b/ci/run-local.sh new file mode 100755 index 0000000000..8848257658 --- /dev/null +++ b/ci/run-local.sh @@ -0,0 +1,19 @@ +#!/bin/bash -e +# +# Run the entire buildkite CI pipeline locally for pre-testing before sending a +# Github pull request +# + +cd "$(dirname "$0")/.." +BKRUN=ci/node_modules/.bin/bkrun + +if [[ ! -x $BKRUN ]]; then + ( + set -x + cd ci/ + npm install bkrun + ) +fi + +set -x +./ci/node_modules/.bin/bkrun ci/buildkite.yml diff --git a/ci/shellcheck.sh b/ci/shellcheck.sh index 8a33cec9d5..551a029146 100755 --- a/ci/shellcheck.sh +++ b/ci/shellcheck.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")/.." set -x docker pull koalaman/shellcheck -find . -name "*.sh" -not -regex ".*/.cargo/.*" -print0 \ +find -E . -name "*.sh" -not -regex ".*/(.cargo|node_modules)/.*" -print0 \ | xargs -0 \ docker run -w /work -v "$PWD:/work" \ koalaman/shellcheck --color=always --external-sources --shell=bash