Allow nom_build to run in Cloudbuild (#1021)

* Allow nom_build to run in Cloudbuild

Our builder comes with python3.6 and cannot support nom_build out of
box. Nom_build requires dataclasses which is introduced in v3.7.

I haven't found an easy way to get python3.7+ without changing the base
linux image. This PR explicitly installs dataclasses.
This commit is contained in:
Weimin Yu 2021-03-19 11:28:18 -04:00 committed by GitHub
parent 8a1200dc4c
commit 21655bc539

View file

@ -23,6 +23,10 @@ apt-get upgrade -y
apt-get install openjdk-11-jdk-headless -y
# Install Python
apt-get install python -y
# As of March 2021 python3 is at v3.6. Get pip then install dataclasses
# (introduced in 3.7) for nom_build
apt-get install python3-pip -y
python3 -m pip install dataclasses
# Install Node
curl -sL https://deb.nodesource.com/setup_current.x | bash -
apt-get install -y nodejs