Hands-on Pipeline as Code with Jenkins

Download Full Version of the eBook "Hands-on Pipeline as Code with Jenkins"

Hands-on Pipeline as Code with Jenkins: CI/CD Implementation for Mobile, Web, and Hybrid Applications Using Declarative Pipeline in Jenkins by Ankita Patil

Download - Hands-on Pipeline as Code with Jenkins: CI/CD Implementation for Mobile, Web, and Hybrid Applications Using Declarative Pipeline in Jenkins by Ankita Patil - ePUB 

DevOps is a software development practice that focuses on culture change and brings quality and faster time to market in Application Lifecycle Management. DevOps practices implementation is popular in all customer discussions. At times, it is considered as a value add. The combination of people, processes, and tools brings the culture change initiative to reality.


The DevOps pipeline or CI/CD pipeline is a popular word used. What does it mean? The pipeline includes different operations in different environments. Continuous Integration (CI) and Continuous Delivery (CD) are some of the most popular DevOps practices. Continuous Integration involves development, code analysis, unit testing, code coverage calculation, and build activities which are automated using various tools. Continuous Delivery is all about deploying your package into different environments, so that end-users can access it. There are different ways to create a pipeline/orchestration that involves Continuous Integration, Continuous Delivery, Continuous Testing, Continuous Deployment, Continuous Monitoring, and other DevOps practices. Each tool provides different ways to create a pipeline.


In this book, we will discuss Jenkins. Jenkins is an open-source automation tool that offers an easy way to set up a CI/CD pipeline for almost any combination of languages, tools, and source code repositories. The Jenkins project was started in 2004 (originally Hudson). Initially, Jenkins was more popular for Continuous Integration, but after the release of Jenkins 2.0, Jenkins is utilized to automate and orchestrate the entire Application Management Lifecycle. The Jenkins community offers more than 1,500 plugins that empower Jenkins users to create orchestration by integrating almost all popular tools in different categories.


A pipeline is the most talked about concept that refers to the groups of stages or events or jobs that are connected in a specific sequence with sequential or parallel execution flow based on the use case. There are different ways to create a pipeline in Jenkins. In this book, we will create the Declarative Pipeline and also discuss the Multibranch pipeline that facilitates to create different Jenkinsfiles for different branches in the code repository. Jenkins will automatically discover branches where the Jenkinsfile is available. The Jenkinsfile contains the scripted or declarative pipeline. It is managed in Version Control, and hence, it is easy to maintain. Blue Ocean provides pipeline visualization and pipeline editor to create the Declarative pipeline quickly.


The main objective of this book is to provide an easy path for beginners who want to create the Declarative Pipeline for programming languages such as Java, Android, iOS, AngularJS, NodeJS, Flutter, Ionic Cordova, and DotNet. Each chapter based on a specific programming language focuses on a Pipeline that includes Static Code Analysis using SonarQube or Lint tools, Unit test execution, calculating code coverage, publishing unit tests and code coverage in uniform reports, verifying the quality of code coverage with Quality Gate, creating a build/package, and distributing a package to a specific environment based on the type of programming languages. You will learn the following in the 11 chapters of this book:

Chapter 1, introduces all the areas which encompass the field of DevOps practices. It discusses the definition of DevOps, DevOps history, benefits of DevOps culture, DevOps and Value Streams, DevOps Practices (objective, benefits, challenges, tools, best practices, and outcomes), Continuous Planning, Continuous Code Inspection, Continuous Integration (CI), Cloud Computing and Containers, Continuous Delivery and Continuous Deployment, Continuous Testing, Continuous Monitoring, Continuous Feedback, Continuous Improvements / Innovations, and Measurements. This chapter focuses on Cognitive biases in specific sections and how DevOps practices implementation helps to address it. It also emphasises on how the Nudge theory can help the culture transformation process.


Chapter 2, introduces you to Jenkins 2.X, history of Jenkins, pre-requisites to install Jenkins, how to run Jenkins, different Pipeline types such as Build pipeline, Scripted pipeline, Declarative pipeline, and Blue Ocean.


Chapter 3, discusses how to implement Continuous Integration and Continuous Delivery for a sample Java application. This chapter provides step-by-step instructions to import code from the repository, sonarqube integration, create Azure App Services – Platform as a Service to host Java Web Applications, Unit Tests execution and Code coverage, Static Code Analysis (SCA) using SonarQube, build a wAR or package file, upload a package file to Artifactory, download a package from Nexus and Artifactory, deploy to the Azure App Services Dev Environment, promotion (Approval) request to deploy to the QA environment, and rollback.


Chapter 4, discusses how to implement Continuous Integration and Continuous Delivery for an Android Application using Pipeline as Code in Jenkins. This chapter provides step-by-step instructions to create a multi-stage pipeline for an Android App, how to import a repository, how to perform Lint Analysis for an Android application, execute Unit tests, calculate Code coverage, verify build quality, create an APK file, and configure Continuous Delivery by deploying the Package/APK to the App Center.


Chapter 5, discusses how to implement Continuous Integration and Continuous Delivery for an iOS Application using a declarative pipeline in Jenkins. The chapter covers step-by-step instructions to create a multi-stage pipeline for the iOS App to configure Continuous Integration, understand how to perform Lint Analysis for an iOS application, how to execute Unit tests and calculate Code coverage, verify build quality based on Unit test coverage, to create an IPA file and deploy it to the App Center.


Chapter 6, covers how to implement Continuous Integration and Continuous Delivery for an Angular Application using Pipeline as Code in Jenkins. It covers step-by-step instructions for a multi-stage pipeline that includes Junit and Cobertura configuration in karma.conf.js, Lint, Unit tests, and Code Coverage configuration in Package.json, Unit Tests and Code Coverage calculation, end-to-end test execution, and NPM Audit, verify build Quality, deploy an Angular application to a docker container, and deploy an Angular application to Azure Kubernetes Services (AKS).


Chapter 7, discusses how to implement Continuous Integration and Continuous Delivery for a Node.js Application using a Declarative pipeline in Jenkins. It also covers how to implement Continuous Integration and Continuous Delivery for the Node.js Application. It includes step-by-step instructions to create a multi-stage pipeline for the NodeJS Express App with Lint, Unit tests, and Code Coverage configuration in Package.json, how to configure Unit Tests and Code Coverage using Jest, configure build Quality plugin, archive files, and deploy Node.js Express Web App to Azure App Services. In the other section, it includes step-by-step instructions to create a multi-stage pipeline for the NodeJS Application with Lint, Unit tests, and Code Coverage configuration in Package.json, a configuration of Unit tests and Code coverage using Mocha, configuration of build Quality plugin using Pipeline as Code.


Chapter 8, discusses how to implement Continuous Integration and Continuous Delivery for Hybrid Mobile Apps developed in Ionic Cordova and Flutter using Pipeline as Code in Jenkins. It covers a multi-stage pipeline for Hybrid Mobile applications for tasks such as code analysis, Unit test execution and Code coverage, builds quality check, and distributes app package to App Center.


Chapter 9, discusses how to implement Continuous Integration and Continuous Delivery for a Python Application using Pipeline as Code in Jenkins. It covers a multi-stage pipeline for a Python application for tasks such as Static Code Analysis (SCA) using SonarQube, Unit test execution and Code coverage, and build quality check.


Chapter 10, discusses how to implement Continuous Integration and Continuous Delivery for a DotNet application using Pipeline as Code in Jenkins. It covers a multi-stage pipeline for a DotNet application for tasks such as Static Code Analysis (SCA) using SonarQube, Unit test execution and Code coverage, and build quality check.


Chapter 11, covers best practices to implement DevOps Practices using Jenkins.


47
Views
0
Likes

Licenses:

  • CC BY-NC-SA 3.0 PH
  • The author's reference is not required

Share on networks

eBooks Details:

Comments (0) Add

Кликните на изображение чтобы обновить код, если он неразборчив
No comments yet. Your comment will be the first!