I have run into a problem where I need to run both Java+Android and NodeJS in the same CloudBuild "step".
My current situation is that I'm trying to build a react-native
project within Google CloudBuild. The problem with this is that while bundling for Android with .gradlew
a node script is called.
I tried using a CloudBuild step config like this:
{
"name": "gcr.io/$PROJECT_ID/android:29",
"args": ["./gradlew", "bundleProductionRelease"]
}
But this resulted in this error:
Cannot run program "node": error=2, No such file or directory
Of course, this makes sense, as there would be no reason for NodeJS to be installed by this container.
My question is how can I run this script using both the NodeJS and Android container images?