Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Added buildkite asdf installer #226

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -eu
pushd "$(dirname "${BASH_SOURCE[0]}")"/../..

# Skip the rest if this is pipeline upload or empty
if [[ "${BUILDKITE_COMMAND:-}" =~ "buildkite-agent pipeline upload".* ]]; then
exit 0
fi

TOOL_VERSION_FILES=()
mapfile -d $'\0' TOOL_VERSION_FILES < <(fd .tool-versions --hidden --absolute-path --print0)

for file in "${TOOL_VERSION_FILES[@]}"; do
echo "Installing asdf dependencies as defined in ${file}:"
parent=$(dirname "${file}")
pushd "${parent}"

asdf install

popd
done

popd
1 change: 1 addition & 0 deletions .tool-verions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trivy 0.20.0
3 changes: 3 additions & 0 deletions buildkite.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
steps:
- label: :lock: trivy - security
command: ./buildkite/run-trivy.sh
agents: { queue: "standard" }
- label: ':go:'
# Note: go fmt on its own ignores testdata/ directories.
command: test -z $(gfind internal/testdata -type f -name '*.go' -exec gofmt -l {} \;)
Expand Down