Only run yarn build when necessary in tools/pip.sh

The Zuul unittest jobs were timing out which prompted me to take a look
at what might be taking extra time. One thing I noticed is that we're
running the yarn build (which runs react-scripts) multiple times when we
really only need to run it once. The reason for that is our check to see
if zuul web has already built is looking for a file that the builds no
longer produce. Update that check to look for a current file and we'll
save a bit of time in our jobs and when running things locally.

Change-Id: Iae3604fbaf072d53895db850cfc989a832b12b27
This commit is contained in:
Clark Boylan 2022-10-07 13:29:25 -07:00
parent 2593a396d9
commit b163a52c25

View File

@ -39,7 +39,7 @@ then
# Avoid writing yarn into package.json.
npm install -g --no-package-lock --no-save yarn
fi
if [[ ! -f zuul/web/static/status.html ]]
if [[ ! -f zuul/web/static/index.html ]]
then
mkdir -p zuul/web/static
ln -sfn ../zuul/web/static web/build