google-cloud-run
A module to work with Google Cloud Run services
Installation
dagger install github.com/vvaswani/daggerverse/google-cloud-run@v0.1.0
Entrypoint
Return Type
GoogleCloudRun
Example
dagger -m github.com/vvaswani/daggerverse/google-cloud-run@e858c4e84b394abcdb018a8f786d4f764c2cb1c2 call \
func (m *myModule) example() *GoogleCloudRun {
return dag.
GoogleCloudRun()
}
@function
def example() -> dag.GoogleCloudRun:
return (
dag.google_cloud_run()
)
@func()
example(): GoogleCloudRun {
return dag
.googleCloudRun()
}
Types
GoogleCloudRun 🔗
createService() 🔗
Deploys an image to Google Cloud Run and returns a string representing the URL of the new service
examples: dagger call create-service –project myproject –location us-central1 –image docker.io/nginx –http-port 80 –credential env:GOOGLE_CREDENTIAL dagger call create-service –project myproject –location us-central1 –image docker.io/httpd –http-port 80 –credential env:GOOGLE_CREDENTIAL
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
project | String ! | - | No description provided |
location | String ! | - | No description provided |
image | String ! | - | No description provided |
httpPort | Integer ! | - | No description provided |
credential | Secret ! | - | No description provided |
Example
dagger -m github.com/vvaswani/daggerverse/google-cloud-run@e858c4e84b394abcdb018a8f786d4f764c2cb1c2 call \
create-service --project string --location string --image string --http-port integer --credential env:MYSECRET
func (m *myModule) example(ctx context.Context, project string, location string, image string, httpPort int, credential *Secret) string {
return dag.
GoogleCloudRun().
CreateService(ctx, project, location, image, httpPort, credential)
}
@function
async def example(project: str, location: str, image: str, http_port: int, credential: dagger.Secret) -> str:
return await (
dag.google_cloud_run()
.create_service(project, location, image, http_port, credential)
)
@func()
async example(project: string, location: string, image: string, httpPort: number, credential: Secret): Promise<string> {
return dag
.googleCloudRun()
.createService(project, location, image, httpPort, credential)
}
updateService() 🔗
Deploys an image to an existing Google Cloud Run service and returns a string representing the URL of the updated service
example: dagger call update-service –project myproject –location us-central1 –service myservice –image docker.io/nginx –http-port 80 –credential env:GOOGLE_CREDENTIAL
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
project | String ! | - | No description provided |
location | String ! | - | No description provided |
service | String ! | - | No description provided |
image | String ! | - | No description provided |
httpPort | Integer ! | - | No description provided |
credential | Secret ! | - | No description provided |
Example
dagger -m github.com/vvaswani/daggerverse/google-cloud-run@e858c4e84b394abcdb018a8f786d4f764c2cb1c2 call \
update-service --project string --location string --service string --image string --http-port integer --credential env:MYSECRET
func (m *myModule) example(ctx context.Context, project string, location string, service string, image string, httpPort int, credential *Secret) string {
return dag.
GoogleCloudRun().
UpdateService(ctx, project, location, service, image, httpPort, credential)
}
@function
async def example(project: str, location: str, service: str, image: str, http_port: int, credential: dagger.Secret) -> str:
return await (
dag.google_cloud_run()
.update_service(project, location, service, image, http_port, credential)
)
@func()
async example(project: string, location: string, service: string, image: string, httpPort: number, credential: Secret): Promise<string> {
return dag
.googleCloudRun()
.updateService(project, location, service, image, httpPort, credential)
}