Skip to content

use CI system --token flag on ng deploy #2523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yasinkocak opened this issue Jun 25, 2020 · 9 comments
Closed

use CI system --token flag on ng deploy #2523

yasinkocak opened this issue Jun 25, 2020 · 9 comments

Comments

@yasinkocak
Copy link
Contributor

yasinkocak commented Jun 25, 2020

**Angular:9.1.11

**Firebase:7.15.4

**AngularFire:6.0.2

For Ci/CD want use Ci system of firebase-tools:
https://www.npmjs.com/package/firebase-tools#using-with-ci-systems

ng deploy is not possible to use --token flag

Steps to set up and reproduce

On bitbucket pipeline use --token flag
`ng deploy --token= $FIREBASE_TOKEN

Expected behavior

Deploying to firebase hosting,functions

Actual behavior

get error
Unknown option: '--token'

@yasinkocak
Copy link
Contributor Author

yasinkocak commented Jun 26, 2020

PR #2525

@BianchiSeb
Copy link

Hello angularFire team. I literally spend a ton of money in your app for my clients. At least answer us. It’s a shame that core features are broken.
It’s a shame you don’t manage the PR.
At least give us back the projets lead and we can manage it like a TRUE open source project.

@leblancmeneses
Copy link

work around:

 npm run build:staging 

 npx firebase deploy --token $npm_package_config_token

configure .firebaserc to use targets

@YogliB
Copy link

YogliB commented Sep 30, 2020

any progress on this issue?

@jamesdaniels
Copy link
Member

This API is now available in 6.1

@stevebrowndotco
Copy link

After seeing that this was resolved, I tested ng deploy --token {TOKEN} and i still get "Unknown option: '--token'" . What am I doing wrong?

@danieldanielecki
Copy link

I'm on @angular/fire version 6.1.4 and with ng deploy --token $ACCESS_TOKEN_FIREBASE I'm getting Cannot run login in non-interactive mode. See login:ci to generate a token for use in non-interactive environments.

I've noticed Firebase has changed the way of handling CI for SSR, now the automatically generated in package.json scripts predeploy and deploy aren't that useful. Especially with the new setup for .firebaserc for which I couldn't find any official documentation, just some StackOverflow... Mayday.

@RezaRahmati
Copy link

RezaRahmati commented Apr 25, 2021

I tried to set FIREBASE_TOKEN env variable before ng deploy command in CICD, now I get below error, while the value I set in FIREBASE_TOKEN was retrieved through firebase login:ci

Cannot run login in non-interactive mode. See login:ci to generate a token for use in non-interactive environments

Update
The issue was, I ran sudo ng deploy and for some reasons, it wasn't read the firebase token from env, after removing sudo the issue is resolved

@vvvhung
Copy link

vvvhung commented Apr 26, 2021

From @RezaRahmati story, I realized that within FIREBASE_TOKEN env variable, ng deploy can run well (without --token $ACCESS_TOKEN_FIREBASE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants