dev/ci: only asdf install go in pipeline gen (#33853)

Cuts the pipeline generation step from ~60s to ~25s - doing a fresh asdf install golang seems significantly faster than using the asdf tools cache.

Together with #33821 , this significantly reduces the time it takes for builds to get to an "actually running" state (~120s -> ~50s)
This commit is contained in:
Robert Lin 2022-04-13 09:53:10 -07:00 committed by GitHub
parent 17918fd041
commit 1dd80520db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 5 deletions

View File

@ -23,8 +23,14 @@ mkdir -p ./annotations/
# asdf setup
# ----------
if [[ ! "$BUILDKITE_STEP_KEY" == "pipeline-upload" ]]; then
./dev/ci/asdf-install.sh
echo "~~~ Preparing asdf dependencies"
if [[ "$BUILDKITE_STEP_KEY" == "pipeline-gen" ]]; then
echo "pipeline-gen step: running go install only"
asdf install golang
elif [[ "$BUILDKITE_STEP_KEY" == "pipeline-upload" ]]; then
echo "pipeline-upload step: skipping asdf install"
else
echo "skipping asdf install for pipeline upload setp"
echo "running normal install"
./dev/ci/asdf-install.sh
fi

View File

@ -11,6 +11,7 @@ steps:
- group: "Pipeline setup"
steps:
- label: ':hammer_and_wrench: :pipeline: Generate pipeline'
key: 'pipeline-gen'
agents: { queue: standard }
# Prioritize generating pipelines so that jobs can get generated and queued up as soon
# as possible, so as to better assess pipeline load e.g. to scale the Buildkite fleet.

View File

@ -5,13 +5,13 @@
# In most cases you should not need to call this script directly.
if [[ ! "$BUILDKITE" == "true" ]]; then
# Not-in-buildkite simple install.
echo "~~~ asdf install"
echo "asdf install"
asdf install
echo "done installing"
# We can't use exit 0 here, it would prevent the variables to be exported (that's a particular buildkite hook peculiarity).
else
# We need awscli to use asdf cache
echo "~~~ asdf install from cache"
echo "asdf install from cache"
asdf install awscli
echo "done installing awscli"

View File

@ -132,8 +132,10 @@ fi
# Re-run asdf to ensure we have the correct set of utilities to
# run the currently checked out version of the Go unit tests.
echo "--- asdf install checked out tools"
./dev/ci/asdf-install.sh
echo "--- run tests"
if ! ./dev/ci/go-test.sh "$@"; then
annotation=$(
cat <<EOF