When trying to run Firestore emulator in a Gitlab CI/CD pipeline I get the following error:
Firestore Emulator has exited because java is not installed, you can install it from https://openjdk.java.net/install/
The question is, how do I install java in this env? I found a similar post, but there's no mention of the need of installing java, so I'm wondering if I'm missing something obvious.
This is how my .gitlab-ci.yml
file looks like:
image: node:14.15.4
cache:
paths:
- functions/node_modules/
- project_name/node_modules/
before_script:
- npm i -g firebase-tools
.test_and_deploy:
script:
- cd functions
- npm i
- cd ..
- cd project_name
- npm i
- cd ..
- cd functions
- npm run build
- firebase emulators:exec -P project_name --only firestore "npm run test-once"
- cd ..
- cd project_name
- cp .env.project_name.local .env
- npm run build
- firebase --project project_name deploy