{"id":16577384,"url":"https://github.com/oliver006/drone-gcf","last_synced_at":"2026-02-26T12:04:56.122Z","repository":{"id":35101632,"uuid":"171199833","full_name":"oliver006/drone-gcf","owner":"oliver006","description":"Drone Plugin for deploying Google Cloud Functions","archived":false,"fork":false,"pushed_at":"2024-01-30T06:46:18.000Z","size":52,"stargazers_count":4,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-05T15:50:04.964Z","etag":null,"topics":["drone","drone-ci","drone-plugin","google-cloud-functions"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliver006.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-18T02:18:08.000Z","updated_at":"2023-09-05T13:55:47.000Z","dependencies_parsed_at":"2024-01-30T07:46:33.650Z","dependency_job_id":null,"html_url":"https://github.com/oliver006/drone-gcf","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/oliver006/drone-gcf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver006%2Fdrone-gcf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver006%2Fdrone-gcf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver006%2Fdrone-gcf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver006%2Fdrone-gcf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliver006","download_url":"https://codeload.github.com/oliver006/drone-gcf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver006%2Fdrone-gcf/sbom","scorecard":{"id":705131,"data":{"date":"2025-08-11","repo":{"name":"github.com/oliver006/drone-gcf","commit":"df5212618bfe88e8efc1f7d06d21ed57e751931f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":5,"reason":"Found 15/30 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:15","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T06:20:17.877Z","repository_id":35101632,"created_at":"2025-08-22T06:20:17.877Z","updated_at":"2025-08-22T06:20:17.877Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29858461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drone","drone-ci","drone-plugin","google-cloud-functions"],"created_at":"2024-10-11T22:10:43.198Z","updated_at":"2026-02-26T12:04:56.104Z","avatar_url":"https://github.com/oliver006.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://cloud.drone.io/api/badges/oliver006/drone-gcf/status.svg)](https://cloud.drone.io/oliver006/drone-gcf) [![Coverage Status](https://coveralls.io/repos/github/oliver006/drone-gcf/badge.svg?branch=master)](https://coveralls.io/github/oliver006/drone-gcf?branch=master)\n\n## Drone-GCF - a Drone.io plugin to deploy Google Cloud Functions\n\n![](google-cloud-functions.svg)\n\n\n### Overview\n\nThe plugin supports deploying, listing, calling, and deleting of multiple functions at once.\nSee below for an example drone.yml configuration that deploys several functions\nto GCP Cloud Functions and later deletes two of them.\nA service account is needed for authentication to GCP and should be provided\nas json string via drone secrets. In the configuration below, the json of\nthe service account key file is stored in the drone secret called `token`.\n\n#### Deploying Cloud Functions\n\nExample `.drone.yml` file (drone.io 1.0 format):\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n  - name: test\n    image: golang\n    commands:\n      - \"go test -v\"\n    when:\n      event:\n        - push\n\n\n  - name: deploy-cloud-functions\n    image: oliver006/drone-gcf\n    settings:\n      action: deploy\n      project: myproject\n      token:\n        from_secret: token\n      runtime: go111\n      env_secret_db_password:\n        from_secret: db_password_prod\n      env_secret_user_api_key:\n        from_secret: user_api_key_prod\n      functions:\n        - TransferFileToGCS:\n          - trigger: http\n            memory: 2048MB\n            allow_unauthenticated: true\n            gen2: true\n            environment:\n              - ENV_VAR: env_var_value_123\n        - HandleEvents:\n          - trigger: topic\n            trigger_resource: \"projects/myproject/topics/mytopic\"\n            memory: 512MB\n        - ProcessEmails:\n          - trigger: http\n            memory: 512MB\n            runtime: python37\n            source: ./python/src/functions/\n            vpcconnector: vpc-connector\n            env_vars_file: \".env.yaml\"\n        - ProcessSecrets:\n            - trigger: http\n              runtime: python37\n              source: ./python/src/functions/\n              secrets:\n                /mnt/path: gcpsm_secrets:latest\n                TOP_SECRET: gcpsm_top_secret:1\n\n    when:\n      event: push\n      branch: master\n\n\n  - name: delete-cloud-functions\n    image: oliver006/drone-gcf\n    settings:\n      action: delete\n      functions:\n        - TransferFileToGCS\n        - HandleEvents\n    when:\n      event: tag\n```\n\n\nThe plugin supports several types of Google Cloud Function triggers:\n- `http`   - triggered for every request to an HTTP endpoint, no other parameters are needed. (see gcloud output for URL of the endpoint).\n- `bucket` - triggered for every change in files in a GCS bucket. Supply the name of the bucket via `trigger_resource`.\n- `topic`  - triggered for every message published to a PubSub topic. Supply the name of the topic via `trigger_resource`.\n- `event`  - triggered for every event of the type specified via `trigger_event` of the resource specified via `trigger_resource`.\n\nSee the output of `gcloud functions deploy --help` for more information regarding the setup of triggers.\n\nWhen deploying a function, there is the option to deploy as a public function. This can be configured by setting `allow_unauthenticated` to `true`. This adds the --allow-unauthenticated flag described [here](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--allow-unauthenticated) to the deploy command. Please note that this expects a boolean value, either `true` or `false`.\n\nBy default, the plugin will use the GCP project ID of the service account provided but you can override it\nby setting the `project` parameter.\n\nThe runtime can be set on a per-function basis or for all functions at once. In the example above, the runtime\nis set to `go111` for all functions and then overwritten with `python37` for just `ProcessEmails`.\nThis will result in the plugin deploying three functions, two in Golang and one in Python. \\\nIf no runtime setting is provided at all, the plugin will fail.\n\nBy default, the function is deployed without specifying a Generation Version. To use Cloud Functions Second Generation, set `gen2` to `true` on each function. This adds the `--gen2` flag as described [here](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--gen2) to the deploy command. Please note that this expects a boolean value, either `true` or `false`.\n\nSimilarly, you can set the `source` location of each function in case you keep the code in separate folders.\n\nThere are three ways to set environment variables when deploying cloud functions:\n- from a secret\n- putting the value directly into the drone.yml file\n- Google Secret Manager\n\nTo pull in an environment variable value from a secret, add an entry to the settings that starts\nwith `env_secret_` followed by the name as which the variable will be made available to the cloud function.\nIn the config example above, drone will pull the values from the secrets `db_password_prod` and `user_api_key_prod` and\nmake them available as `DB_PASSWORD` and `USER_API_KEY`. (env variable names will be upper-case) \\\n\nEnvironment variables from secrets will be made available to *all* functions that you deploy within one drone step.\nIf, for whatever reasons, this is not acceptable and you need to keep them separate then you have to use\nmultiple drone steps, one for each function.\n\nIf you run into issues when setting environment variables with special characters in their values, there's a setting\nyou can use to specify a *delimiter string* to be used as separation between variables. Normally, `gcloud` would use a\ncomma (*,*), but we've set the default to something more unlikely to cause any issue (*:|:*). If you still need to change\nit, you can use the *environment_delimiter* setting.\n\nUsing [Google Secret Manager](https://cloud.google.com/functions/docs/configuring/secrets#gcloud) allows two ways to make secret available to the functions.\n\n- Mounting a secret as a volume, making it available as a file. `/mnt/secrets: gcpsm_secret:latest`, where the key is the mount point, and the value is the secret name followed by the version.\n- As an environment variable. `ENV_NAME: gcpsm_secret:1`, where the key is the name of the variable and the value is the secret name followed by the version.\n\n#### Calling Cloud Functions\n\nYou can also trigger a cloud function by using `call` as the action.\nOptionally, you can supply a json data string that will be passed to the function.\n\n```yaml\n  - name: call-cloud-function\n    image: oliver006/drone-gcf\n    settings:\n      action: call\n      project: myproject\n      token:\n        from_secret: token\n      functions:\n        - UpdateDatabase:\n          - data: '{\"key\": \"value\"}'\n    when:\n      event: tag\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliver006%2Fdrone-gcf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliver006%2Fdrone-gcf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliver006%2Fdrone-gcf/lists"}