0

I'm having trouble automating react native release build apps using firebase app distribution with Gitlab CI/CD. I get this error Error: set the --app option to a valid Firebase app id and try again Also see image:See image here

I've setup ".gitlab-ci.yml" file as below

## install project deps with --frozen-lockfile to make sure we will have the same packages version ( very recommended  on running yarn install on ci)
##run: yarn install --frozen-lockfile
before_script:
  - yarn install --frozen-lockfile
  - yarn global add firebase-tools

stages:
  - buildApp

buildApp project:
  stage: buildApp
  image: reactnativecommunity/react-native-android
  cache:
    key:
      files:
        - yarn.lock
    paths:
      - node_modules
    policy: pull #`pull` the jobs pull the cache at the beginning but do not push the changes again.
  script:
    - yarn build:apk
    - yarn install --pure-lockfile --cache-folder .yarn
    - ./bin/app_distribution.sh
    # - firebase use kavyatara --token "$FIREBASE_TOKEN"
    # - firebase deploy --token "$FIREBASE_TOKEN"

  artifacts:
    paths:
      - android/app/build/outputs/apk/release/app-release.apk

Also app_distribution.sh file

#!/bin/bash RELEASE_NOTE="New update Android build"

firebase appdistribution:distribute android/app/build/outputs/apk/release/app-release.apk   \
    --token "$FIREBASE_TOKEN" \
    --app "$FIREBASE_APP_ID" \
    --release-notes "$RELEASE_NOTE" --testers-file testers.txt
Ujjwal Manandhar
  • 236
  • 1
  • 2
  • 12
  • could you try to hardcode the firebase app id in you script app distribution script? – alvAro365 May 02 '22 at 15:16
  • @alvAro365 okay trying with hardcode firebase app id in the script. Also do you know why I'm not getting cache result though I've cached node_modules ? – Ujjwal Manandhar May 02 '22 at 15:24

0 Answers0