Dagger
Search

cloudflare

Deploy applications to Cloudflare Workers and Pages

Installation

dagger install github.com/fluent-ci-templates/cloudflare-pipeline@v0.9.3

Entrypoint

Return Type
Cloudflare
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@f3fb5a384bbc9d9e7ab28f99ae1112853a702070 call \
func (m *myModule) example() *Cloudflare  {
	return dag.
			Cloudflare()
}
@function
def example() -> dag.Cloudflare:
	return (
		dag.cloudflare()
	)
@func()
example(): Cloudflare {
	return dag
		.cloudflare()
}

Types

Cloudflare 🔗

deploy() 🔗

Deploy your Worker to Cloudflare

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
apiTokenSecret !-No description provided
accountIdString !-No description provided
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@f3fb5a384bbc9d9e7ab28f99ae1112853a702070 call \
 deploy --src DIR_PATH --api-token env:MYSECRET --account-id string
func (m *myModule) example(ctx context.Context, src *Directory, apiToken *Secret, accountId string) string  {
	return dag.
			Cloudflare().
			Deploy(ctx, src, apiToken, accountId)
}
@function
async def example(src: dagger.Directory, api_token: dagger.Secret, account_id: str) -> str:
	return await (
		dag.cloudflare()
		.deploy(src, api_token, account_id)
	)
@func()
async example(src: Directory, apiToken: Secret, accountId: string): Promise<string> {
	return dag
		.cloudflare()
		.deploy(src, apiToken, accountId)
}

pagesDeploy() 🔗

Deploy a directory of static assets as a Pages deployment.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
apiTokenSecret !-No description provided
accountIdString !-No description provided
directoryString !-No description provided
projectNameString !-No description provided
Example
dagger -m github.com/fluent-ci-templates/cloudflare-pipeline@f3fb5a384bbc9d9e7ab28f99ae1112853a702070 call \
 pages-deploy --src DIR_PATH --api-token env:MYSECRET --account-id string --directory string --project-name string
func (m *myModule) example(ctx context.Context, src *Directory, apiToken *Secret, accountId string, directory string, projectName string) string  {
	return dag.
			Cloudflare().
			PagesDeploy(ctx, src, apiToken, accountId, directory, projectName)
}
@function
async def example(src: dagger.Directory, api_token: dagger.Secret, account_id: str, directory: str, project_name: str) -> str:
	return await (
		dag.cloudflare()
		.pages_deploy(src, api_token, account_id, directory, project_name)
	)
@func()
async example(src: Directory, apiToken: Secret, accountId: string, directory: string, projectName: string): Promise<string> {
	return dag
		.cloudflare()
		.pagesDeploy(src, apiToken, accountId, directory, projectName)
}