Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

A drone plugin to deploy Google Cloud Run containers.

Notifications You must be signed in to change notification settings

newsdev/drone-cloud-run

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

drone-cloud-run - A drone.io plugin to deploy Google Cloud Run containers.

Usage

For usage in drone v1.0:

kind: pipeline
name: default

steps:
  - name: deploy-using-new-drone-plugin-version
    image: oliver006/drone-cloud-run:latest
    pull: always
    settings:
      action: deploy
      service: my-api-service
      runtime: gke                                              # default=managed
      image: org-name/my-api-service-image
      timeout: 10m                                              # google cloud default is 5m
      memory: 512Mi
      variant: alpha                                            # uses "gcloud alpha run" command variant, default=<empty string>. Other supported variant is beta.
      region: us-central1
      allow_unauthenticated: true                               # default=false
      svc_account: [email protected] 
      addl_flags: 
        add-cloud-sql-instances: instance1,instance2
      token:
        from_secret: google_credentials
      environment:
        VAR_1: "var01"
        ANOTHER_ENV_VAR: "env_var_value"
      env_secret_api_key:
        from_secret: api_key_prod

For usage in drone v0.8:

kind: pipeline
name: default

steps:
  - name: deploy-using-new-drone-plugin-version
    image: oliver006/drone-cloud-run:latest
    pull: always

    # plugin settings are top-level
    action: deploy
    service: my-api-service
    deployment_image: org-name/my-api-service-image
    memory: 512Mi
    region: us-central1
    allow_unauthenticated: true
    svc_account: [email protected]
    addl_flags:
        clear-cloudsql-instances: ''
    secrets:
      - source: google_credentials
        target: token
      - source: api_key_prod
        target: env_secret_api_key

On Additional Flags

To be flexible with respect to flags that the gcloud command can accept, you can use addl_flags in your drone setup settings. Use the flags are they're described in the documentation without the prefix -- (eg. --set-config-maps becomes set-config-maps). If the flag doesn't require any arguments, use '' as the value.

About

A drone plugin to deploy Google Cloud Run containers.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.5%
  • Dockerfile 5.0%
  • HTML 0.5%