Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Full Stack Quarkus and React

You're reading from  Full Stack Quarkus and React

Product type Book
Published in Nov 2022
Publisher Packt
ISBN-13 9781800562738
Pages 324 pages
Edition 1st Edition
Languages
Author (1):
Marc Nuri San Felix Marc Nuri San Felix
Profile icon Marc Nuri San Felix

Table of Contents (21) Chapters

Preface 1. Part 1– Creating a Backend with Quarkus
2. Chapter 1: Bootstrapping the Project 3. Chapter 2: Adding Persistence 4. Chapter 3: Creating the HTTP API 5. Chapter 4: Securing the Application 6. Chapter 5: Testing Your Backend 7. Chapter 6: Building a Native Image 8. Part 2– Creating a Frontend with React
9. Chapter 7: Bootstrapping the React Project 10. Chapter 8: Creating the Login Page 11. Chapter 9: Creating the Main Application 12. Chapter 10: Testing Your Frontend 13. Chapter 11: Quarkus Integration 14. Part 3– Deploying Your Application to the Cloud
15. Chapter 12: Deploying Your Application to Kubernetes 16. Chapter 13: Deploying Your Application to Fly.io 17. Chapter 14: Creating a Continuous Integration Pipeline 18. Index 19. Other Books You May Enjoy Appendix – Answers

Creating a Continuous Integration Pipeline

In this chapter, we’ll learn how to create a continuous integration (CI) pipeline with GitHub Actions for our task manager application. We’ll start by learning about CI and why it’s important in the context of GitHub Actions. Then, we’ll learn how to create a GitHub repository to host our project and how to push our local files to the new repository. Finally, we’ll learn how to create a GitHub Actions pipeline to build and test our project and understand how this fits in a CI and deployment software development practice.

By the end of this chapter, you should have a basic overview of GitHub Actions, and know how to implement CI workflows and pipelines for your projects. Being able to create CI pipelines for your project will allow you and your team to adopt agile software development practices while guaranteeing that your application doesn’t break with each small change.

We will be covering the...

Technical requirements

In this chapter, we’ll create CI pipelines that run on the GitHub Actions server and virtual machine (VM) infrastructure. There is no need to have a Java JDK or Node.js setup.

You will need a Git setup on your machine to be able to persist your code and push it to GitHub. You will also need access to the internet and a GitHub account.

You can download the full source code for this chapter from https://github.com/PacktPublishing/Full-Stack-Quarkus-and-React/tree/main/chapter-14.

Introducing GitHub Actions

Before we dig deeper into GitHub and its Actions infrastructure, we need to have a better understanding of the CI, continuous delivery, and continuous deployment (CD) concepts (usually abbreviated as CI/CD), and how these agile practices can help in the software delivery process.

What is continuous integration?

The term continuous integration was originally coined by Grady Booch in his book Object-Oriented Analysis and Design with Applications, published in 1991. CI is a software development practice by which several developers commit their work on a single development project to a central repository where automated builds and tests are run to guarantee that these changes won’t break the project. Further refinements of the CI term, especially those proposed by the Extreme Programming (XP) software development methodology, include repeating this operation multiple times a day.

CI tries to solve the problem where other development processes...

Creating and pushing the application into a GitHub repository

If you’ve been following along with this book, by now, you should have a directory in your filesystem that contains the complete application. If this is not the case, you can always download the ZIP file containing the application source code from https://github.com/PacktPublishing/Full-Stack-Development-with-Quarkus-and-React/, and use the code from Chapter 13 as the starting point. In this section, we’ll push the source code to a new GitHub repository.

GitHub user account

This section assumes you already have a GitHub user account. If this is not the case, you can easily create one by following the wizard at https://github.com/signup. The only requirement is having a valid email address.

Let’s start by creating the new repository by clicking on the plus symbol and the New repository menu entry:

Figure 14.1 – A screenshot of GitHub’s Create new pop-up menu

Figure 14.1 – A screenshot of GitHub’s Create new pop-up...

Creating a GitHub Actions pipeline

GitHub Actions pipelines or workflows are defined through YAML files that contain one or more jobs that are triggered by a set of specific git or GitHub events. The workflow YAML files must be located within the .github/workflows directory, so we’ll start by creating this directory:

Figure 14.5 – A screenshot of the IntelliJ New Directory dialog

Next, we can create the YAML file that will hold our workflow. For this purpose, we’ll create a new file called build-and-test.yaml in the .github/workflows directory. You can find the full source code for the pipeline at https://github.com/PacktPublishing/Full-Stack-Development-with-Quarkus-and-React/tree/main/chapter-14/.github/workflows/build-and-test.yaml. Now, let’s analyze the most relevant parts:

name: Build and Test

name will be used to identify the workflow when referenced from the GitHub repository UI. You should always provide a descriptive...

Summary

In this chapter, we learned how to create a CI pipeline for our task manager application with GitHub Actions. We started by learning about continuous integration, delivery, and deployment, and how these concepts are related to GitHub Actions. Then, we learned how to create a GitHub repository for our project, and how to push the application files we’ve been creating throughout this book. Finally, we learned how to create a GitHub Actions workflow to build and test our project to ensure future changes won’t break the application and help us start our journey with CI/CD. You should now have a basic understanding of GitHub Actions and know how to implement pipelines.

Amazing job! You have reached the end of Chapter 14, Creating a Continuous Integration Pipeline, and the end of Full Stack Quarkus and React. You should now have enough skills and confidence to implement, test, and deploy full-stack web applications using Quarkus as a backend and React as the frontend...

Questions

  1. What is continuous delivery?
  2. What is continuous deployment?
  3. What is the advantage of GitHub Actions compared to other alternatives?
  4. How do you initialize a local git repository?
  5. Can you trigger a GitHub Actions workflow manually?
lock icon The rest of the chapter is locked
You have been reading a chapter from
Full Stack Quarkus and React
Published in: Nov 2022 Publisher: Packt ISBN-13: 9781800562738
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}