firebase / firebase/firebase-tools

Firebase Deployment of App hosting and exist option while starting the rollouts to save cost on CI/CD

Open
#8,907 0 comments 4 reactions 0 assignees View on GitHub
api: apphosting type: feature request
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### Summary

When using `firebase deploy --only apphosting` in CI/CD environments like GitHub Actions, the CLI waits for the full rollout process to complete. This often exceeds CI job timeouts, leading to unnecessary cost and job failures, even though the CLI logs "It's safe to exit now."

Firebase App Hosting rollouts are asynchronous by nature. However, the CLI currently **does not offer an option to exit gracefully once the rollout is triggered**.

---

### Why This Matters

In CI/CD pipelines:
- Time is billed (especially for self-hosted runners or usage-limited plans)
- Long-running deployments cause cost overruns or failed builds
- The CLI itself confirms that rollouts can continue in the background

Developers need a way to **exit early once rollout starts**, while still ensuring the deploy was triggered successfully.

---

### Requested Feature

Please add a CLI option like:

- `--exit-after-rollout-start`
- `--no-wait`
- `--async`

This flag should:
- Trigger the App Hosting deployment
- Output the rollout tracking URL
- Exit immediately with a success status

This will optimize CI/CD workflows, reduce runtime cost, and align with Firebase’s own messaging ("It's safe to exit now").

---

### Current Workarounds (Unreliable)

- Using `continue-on-error: true` (may ignore actual failures)
- Killing the deploy process after a `sleep` delay
- Parsing CLI logs manually to detect rollout start

These approaches are fragile and not ideal for production pipelines.

---

### Example Use Case

```bash
firebase deploy --only apphosting --project=my-project --async

Please submit feature requests through our [support page](https://firebase.google.com/support/troubleshooter/report/features/).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.