{"id":20140194,"url":"https://github.com/czantoine/devops-pipeline-google-cloud","last_synced_at":"2026-02-02T14:33:26.028Z","repository":{"id":140681787,"uuid":"450481496","full_name":"czantoine/DevOps-Pipeline-Google-Cloud","owner":"czantoine","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-21T12:23:22.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T21:49:59.027Z","etag":null,"topics":["devops","gcp","pipeline"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/czantoine.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":"2022-01-21T12:23:04.000Z","updated_at":"2022-02-10T21:51:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef9fcec9-d8c3-49e7-854d-2488af9d5bf1","html_url":"https://github.com/czantoine/DevOps-Pipeline-Google-Cloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/czantoine/DevOps-Pipeline-Google-Cloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2FDevOps-Pipeline-Google-Cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2FDevOps-Pipeline-Google-Cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2FDevOps-Pipeline-Google-Cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2FDevOps-Pipeline-Google-Cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czantoine","download_url":"https://codeload.github.com/czantoine/DevOps-Pipeline-Google-Cloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2FDevOps-Pipeline-Google-Cloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29013034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["devops","gcp","pipeline"],"created_at":"2024-11-13T21:49:41.112Z","updated_at":"2026-02-02T14:33:26.020Z","avatar_url":"https://github.com/czantoine.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevOps Pipeline Google Cloud \n\nBuild a continuous integration pipeline using Cloud Source Repositories, Cloud Build, build triggers, and Container Registry.\n\n![Project](img/project.png)\n\n## Init Git Repository\n\nTo the Cloud Console go to Activate Cloud Shell\n\n``` shell\nmkdir gcp-course\ncd gcp-course\ngcloud source repos clone devops-repo\ncd devops-repo\n```\n\n## Python App\n\nInto folder devops-repo, create new file main.py \n\n``` shell \nvi main.py \n``` \n\nSee the main.py file into my repo\n\nCreate new folder templates \n\n``` shell\nmkdir templates\nvi layout.html\n```\n\nSee the layout.html into /templates folder\n\nSame with the file index.html\n\n```shell\nvi index.html\n```\n\n Into devops-repo, create a new file requirement.txt\n\n ``` shell\n echo \"Flask==1.1.1\" \u003e requirement.txt\n ```\n\n First, you need to add all the files you created to your local Git repo. In Cloud Shell, enter the following code:\n\n ``` shell \ncd ~/gcp-course/devops-repo\ngit add --all\ngit config --global user.email \"you@example.com\"\ngit config --global user.name \"Your Name\"\ngit commit -a -m \"Initial Commit\"\ngit push origin master\n```\n\n## Deployement Web app in Cloud Shell \n\n``` shell\ncd ~/gcp-course/devops-repo\nsudo pip3 install -r requirements.txt\npython3 main.py\n```\n\nClick on the web preview \"Preview on port 8080.\"\n\nYou can edit the file main.py\n\n``` python\nmodel = {\"title\": \"Hello Tux Fans.\"}\n```\n\nRedeployement on git \n\n``` shell\ncd ~/gcp-course/devops-repo\ngit commit -a -m \"Second Commit\"\ngit push origin master\n```\n\nClick on the web preview \"Preview on port 8080.\" View change.\n\n## Docker build\n\nCreate a Dockerfile \n\n``` shell \ncd ~/gcp-course/devops-repo\nvi Dockerfile\n```\n\nSee the Dockerfile into my repo \n\n## Manage Docker Images with Cloud Build and Container Registry\n\nInto the cloud shell \n\n``` shell \ncd ~/gcp-course/devops-repo\necho $DEVSHELL_PROJECT_ID\n```\n\nDEVSHELL_PROJECT_ID automatically has your current project ID stored.\n\n``` shell \ngcloud builds submit --tag gcr.io/$DEVSHELL_PROJECT_ID/devops-image:v0.1 .\n```\n\nCloud Console and on the Navigation menu, click Container Registry. Your image should be on the list.\n\nNavigate to the Cloud Build service, and your build should be listed in the history.\n\nNow go to Compute Engine and create new instance\n\n| Property        | Value                                                                                   |\n|-----------------|-----------------------------------------------------------------------------------------|\n| Container       | Deploy a container image to this VM instance                                            |\n| Container image | gcr.io/\u003cyour-project-id-here\u003e/devops-image:v0.1 (change the project ID where indicated) |\n| Firewall        | Allow HTTP traffic                                                                      |\n\n``` shell \ncd ~/gcp-course/devops-repo\ngit add --all\ngit commit -am \"Added Docker Support\"\ngit push origin master\n```\n\n## Automate Builds with Triggers\n\nContainer Registry. At this point, you should have a folder named devops-image with at least one container in it.\n\nCloud Build. The Build history page should open, and one or more builds should be in your history.\n\nClick the Triggers link on the left.\n\nClick Create trigger.\n\nName the trigger devops-trigger\n\nSelect your devops-repo Git repository.\n\nSelect .*(any branch) for the branch.\n\nChoose Dockerfile for Build Configuration and select the dafault image.\n\nAccept the rest of the defaults, and click Create.\n\nTo test the trigger, click Run and then Run trigger.\n\nClick the History link and you should see a build running. Wait for the build to finish, and then click the link to it to see its details.\n\nEdit main.py \n\n``` python\nmodel = {\"title\": \"Hello Trigger Fans.\"}\n```\n\n``` shell\ncd ~/gcp-course/devops-repo\ngit commit -a -m \"Testing Build Trigger\"\ngit push origin master\n```\n\n## Test your build changes\n\nWhen the build completes, click on it to see its details. Under Execution Details, copy the image link, format should be gcr.io/qwiklabs-gcp-00-f23112/devops-repoxx34345xx.\n\nGo to the Compute Engine service. As you did earlier, create a new virtual machine to test this image. Select the box to deploy a container image to the VM, and paste the image you just copied.\n\nSelect Allow HTTP traffic. \n\nWhen the machine is created, test your change by making a request to the VM's external IP address in your browser. Your new message should be displayed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczantoine%2Fdevops-pipeline-google-cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczantoine%2Fdevops-pipeline-google-cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczantoine%2Fdevops-pipeline-google-cloud/lists"}