Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

firebase-deploy don't use project_id in KEY_FILE Edited

When using KEY_FILE option, service account key file includes project_id, but firebase-deploy doesn't seem to use it. So we have to specify PROJECT_ID independently.

 

2 answers

@MasaGon yes, KEY_FILE is used to authenticate as well as FIREBASE_TOKEN, and need to be generated on gcp site as key for service role with appropriate permissions, you can also specify there which project may be accessed.

 

Explain if you have another format for this authentication and want to use key file for  specific project id, so if you specify another project, it will fail with 403 forbidden error?

Or do you have another need for your pipeline?

 

Best regards, Galyna

KEY_FILE format is like this. You can see project_id is included. So I don't understand why you have to specify PROJECT_ID separately. We use multiple project for each production, staging and development environment. On some case, deployment is failed without PROJECT_ID. I think PROJECT_ID is unnecessary when KEY_FILE is specified.

{
"type": "service_account",
"project_id": "******************",
"private_key_id": "******************",
"private_key": "-----BEGIN PRIVATE KEY-----*****************-----END PRIVATE KEY-----\n",
"client_email": "***************",
"client_id": "***************",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/*******************"
}

 

0 votes

@MasaGon actually you may not specify the project. It is good practise to specify the project you want to deploy to in .firebaserc file and this option is also available in firebase-deploy pipe.

Regarding key file, it is used for authentication and just confirms that you can deploy to the exact project.

.filebaserc may have multiple projects like this. So, detecting project with KEY_FILE is the most reasonable way when using KEY_FILE, I think.

{

  "projects": {

    "default": "some-project1",

    "development": "some-project2",

    "staging": "some-project3",

    "production": "some-project4"

  }

}

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,326 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you