Dagger
Search

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.

Installation

dagger install github.com/StaytunedLLP/devops/firebase@a1833ef28dcadd8569649ffc5ec6e0afee8009fe

Entrypoint

Return Type
Firebase
Example
dagger -m github.com/StaytunedLLP/devops/firebase@a1833ef28dcadd8569649ffc5ec6e0afee8009fe 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
NameTypeDefault ValueDescription
sourceDirectory !-- The source directory containing the project files.
projectIdString !-- The Google Cloud Project ID for Firebase deployment.
gcpCredentialsSecret !-- The JSON credentials secret (Service Account Key or WIF config).
appIdString -- The Firebase App ID (optional, used for VITE environment injection).
onlyString -- Firebase deploy filter (e.g., 'hosting', 'functions').
frontendDirString -- Path to the frontend directory relative to the source.
backendDirString -- Path to the backend directory relative to the source.
firebaseDirString -- Directory containing firebase.json relative to the source.
webappConfigSecret -- Optional Firebase Web App config JSON secret for granular env injection.
extraEnvSecret -- Optional secret containing additional environment variables to append to .env.
Example
dagger -m github.com/StaytunedLLP/devops/firebase@a1833ef28dcadd8569649ffc5ec6e0afee8009fe call \
 firebase-deploy --source DIR_PATH --project-id string --gcp-credentials env:MYSECRET
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, projectId string, gcpCredentials *dagger.Secret) string  {
	return dag.
			Firebase().
			FirebaseDeploy(ctx, source, projectId, gcpCredentials)
}
@function
async def example(source: dagger.Directory, project_id: str, gcp_credentials: dagger.Secret) -> str:
	return await (
		dag.firebase()
		.firebase_deploy(source, project_id, gcp_credentials)
	)
@func()
async example(source: Directory, projectId: string, gcpCredentials: Secret): Promise<string> {
	return dag
		.firebase()
		.firebaseDeploy(source, projectId, gcpCredentials)
}