Building and Testing Applications on GCP
The course is part of these learning paths
Google Cloud Platform (GCP) is a powerful platform that brings the flexibility and reliability of Google’s infrastructure to your projects. As a leader in AI, machine learning, and networking, GCP has a suite of tools and services for developers to use for almost any circumstance. Before using them, it’s good to learn the ins and outs of GCP and the most effective patterns for software development. The Professional Cloud Developer exam, as well as the industry at large, has been transformed by Continuous Integration (CI) and Continuous Deployment (CD), which enable developers to deliver code safely and securely into production once properly setup. This course will cover the Google best practices for setting up a CI/CD pipeline on GCP.
For support, queries or feedback relating to this course, please contact us at email@example.com.
- Learn GCP core developer services
- Create a CI/CD pipeline with Google Cloud Build
- Test and deploy a containerized application
Developers who are studying for the Google Cloud Professional Cloud Developer Certification exam.
A Cloud Source Repository is a private Git repo that is hosted and managed on GCP instead of GitHub, Bitbucket, or another vendor. If you are already using one of those services for version control, you don't have to give it up to use a Cloud Source Repository. All you need to do is sync it with the external repository, and any changes that get made outside of your Cloud Source Repository will be replicated in it.
The biggest benefit of a Cloud Source Repository is that they also integrate with all of Google's developer services, such as Cloud Build, Pub/Sub, and Stackdriver. That means that you can build automated deployments and other integrations using any tools on GCP. In this demo, we'll go over how to create a Cloud Source Repository and push code into it.
So I'm back here in my terminal and before we start it's worth mentioning that billing does have to be enabled on this project in order for this next step to work. So if you haven't done that, go ahead and enable billing on this project.
To get started with a Cloud Source Repository, I'm going to go ahead and enter
gcloud source repos create hello-world and this is going to create a repository for me called hello-world. All right, now that that's done I will go ahead and clone it. Great, and from this point on I'm going to switch to Visual Studio Code so we get a better understanding of what's going on.
All right, I'm here in Visual Studio Code in my empty repo and the first thing I'm gonna do is go ahead and create a file called main.py and we'll go ahead and put some code in there. Next we're gonna go ahead and make another file called app.yaml, which is going to contain the configuration information we need to deploy to App Engine.
All right and now I can go ahead and open up a terminal window. And I'll go ahead and add these files, commit them, and then push them up to my repository. All right, let's go ahead and take a look at them in the console. Okay here is my Cloud Source Repositories page. And we see I have my hello-world repository here on the list. Let's open that up. We see a commit history, as well as the files in this repository. If we select one, then we see the contents of it. All right, that's all for this demo. We'll see you in the next section.
Chris Blackden started his first IT job at the age of fifteen and has been doing it ever since. He’s held roles from Hardware Technician to Senior Software Engineer, and is currently working as a DevOps Engineer in a healthcare research organization. Some of his passions outside of work include cooking and eating spicy food, and old-school kung fu movies.