mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
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:
parent
17918fd041
commit
1dd80520db
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user