firebase
This module provides a reusable pipeline to automate the deployment process of Firebase applications.It handles dependency installation, building (with VITE environment injection), and deployment
using Google Cloud Workload Identity Federation for secure authentication.
For more information about prerequisites and setup, please refer to:
https://github.com/StaytunedLLP/daggerverse/blob/main/firebase/README.md
Installation
dagger install github.com/StaytunedLLP/daggerverse/firebase@120a982ea08faa5a7ede56f4cce69ec56630fb41Entrypoint
Return Type
Firebase Example
dagger -m github.com/StaytunedLLP/daggerverse/firebase@120a982ea08faa5a7ede56f4cce69ec56630fb41 call \
func (m *MyModule) Example() *dagger.Firebase {
return dag.
Firebase()
}@function
def example() -> dagger.Firebase:
return (
dag.firebase()
)@func()
example(): Firebase {
return dag
.firebase()
}Types
Firebase 🔗
firebaseDeploy() 🔗
Main reusable pipeline to build and deploy Firebase applications.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | - The source directory containing the project files. |
| projectId | String ! | - | - The Google Cloud Project ID for Firebase deployment. |
| gcpCredentials | File ! | - | - The JSON credentials file for authentication (Service Account Key). |
| appId | String | - | - The Firebase App ID (optional, used for VITE environment injection). |
| only | String | - | - Firebase deploy filter (e.g., 'hosting', 'functions'). |
| frontendDir | String | - | - Path to the frontend directory relative to the source. |
| backendDir | String | - | - Path to the backend directory relative to the source. |
| firebaseDir | String | - | - Directory containing firebase.json relative to the source. |
Example
dagger -m github.com/StaytunedLLP/daggerverse/firebase@120a982ea08faa5a7ede56f4cce69ec56630fb41 call \
firebase-deploy --source DIR_PATH --project-id string --gcp-credentials file:pathfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, projectId string, gcpCredentials *dagger.File) string {
return dag.
Firebase().
FirebaseDeploy(ctx, source, projectId, gcpCredentials)
}@function
async def example(source: dagger.Directory, project_id: str, gcp_credentials: dagger.File) -> str:
return await (
dag.firebase()
.firebase_deploy(source, project_id, gcp_credentials)
)@func()
async example(source: Directory, projectId: string, gcpCredentials: File): Promise<string> {
return dag
.firebase()
.firebaseDeploy(source, projectId, gcpCredentials)
}