{"id":23251217,"url":"https://github.com/montao/faas-cicd","last_synced_at":"2025-10-18T00:57:18.181Z","repository":{"id":100795995,"uuid":"282452343","full_name":"montao/faas-cicd","owner":"montao","description":"A cloud function deployed with cloudbuild","archived":false,"fork":false,"pushed_at":"2020-08-02T18:38:33.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T17:14:43.423Z","etag":null,"topics":["cloudbuild","continuous-delivery","faas","gcf","gcloud","golang"],"latest_commit_sha":null,"homepage":"https://europe-west1-koolbusiness.cloudfunctions.net/cloudfunction01","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/montao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-25T13:45:31.000Z","updated_at":"2024-06-19T09:07:36.502Z","dependencies_parsed_at":"2023-06-10T00:07:45.534Z","dependency_job_id":null,"html_url":"https://github.com/montao/faas-cicd","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montao%2Ffaas-cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montao%2Ffaas-cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montao%2Ffaas-cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montao%2Ffaas-cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/montao","download_url":"https://codeload.github.com/montao/faas-cicd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423510,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cloudbuild","continuous-delivery","faas","gcf","gcloud","golang"],"created_at":"2024-12-19T09:16:59.929Z","updated_at":"2025-10-18T00:57:13.138Z","avatar_url":"https://github.com/montao.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Deploy a Cloud Function with Cloud Build\ndescription: Use Cloud Build to continuously deploy a Cloud Function.\nauthor: montao\ntags: Cloud Functions, GitHub, GoLang, continuous integration, continuous delivery, continuous deployment\ndate_published: 2020-07-29\n---\n\nNiklas Rosencrantz | DevOps/SRE\n\n## Introduction\n\nThis tutorial demonstrates how to create and deploy a Cloud Function with [Cloud Build](https://cloud.google.com/cloud-build).\n\n## Objectives\n\n* Use Cloud Build to deploy a Cloud Function.\n* Use code written in the Go programming language to process incoming HTTP requests.\n\n## Set up your environment\n\n1.  Create a project in the [Cloud Console](https://console.cloud.google.com/).\n1.  [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).\n1.  Create a GitHub repository for your project.\n1.  Enable the Cloud Functions API:\n\n        gcloud services enable cloudfunctions.googleapis.com\n\n1.  Add the [Cloud Build GitHub app](https://github.com/marketplace/google-cloud-build) to your GitHub account and repository. \n1.  Create the directory and file structure in the GitHub repository.\n\n    You can use the file tree from the\n    [source for this tutorial](https://github.com/GoogleCloudPlatform/community/tree/master/tutorials/cloud-functions-cloudbuild/) as a starting point. \n    \n    Put a file named `cloudbuild.yaml` in the root directory and the code for the Cloud Function in a separate directory, as in the following file tree:\n\n        │   .gitignore\n        │   cloudbuild.yaml\n        └───code\n                function.go\n\n## Connect the repository with Cloud Build\n\n1.  In the Cloud Console, go to the [Cloud Build](https://console.cloud.google.com/cloud-build) page.\n1.  Choose **Triggers**.\n1.  Click **Connect repository**.\n1.  Create a push trigger so that Cloud Build will run when you push to the master branch. \n\nAfter you have connected the repository with Cloud Build, Cloud Build will run, build, test, and deploy your Cloud Function each time you push to the repository.\n\nYou can view a list of your builds on the [Cloud Builds page of the Cloud Console](https://console.cloud.google.com/cloud-build/builds).\n\nOr this contribution, based on my project https://github.com/GoogleCloudPlatform/community/tree/master/tutorials/cloud-functions-cloudbuild\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontao%2Ffaas-cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmontao%2Ffaas-cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontao%2Ffaas-cicd/lists"}