Skip to content

Installing and configuring Jenkins on an AWS EC2 Instance and building a Jenkins pipeline

Notifications You must be signed in to change notification settings

mattocodes/jenkins-pipeline-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Configuring Jenkins Pipeline On AWS

This project involves provisioning an EC2 instance on Amazon Web Services (AWS), installing Jenkins, and building a Jenkins pipeline using Blue Ocean plugin.

Requirements

  • An AWS user account. You may get one here

  • A GitHub user account. Sign up here

  • Ubuntu 18.04 Operating System (OS)

  • Jenkins

  • Blue Ocean Plugin

  • AWS S3 Bucket

  • HTML code

  • Jenkins file

Jenkins Setup

  • Log into the AWS Mangenment Console with your user name and password

  • Launch a t2.micro EC2 instance with Unbuntu 18.04 selected as your OS. Follow the guide here

  • After launching an EC2 instance, remotely connect to it.

  • Then install Jenkins on Ubuntu.

  • Now unlock Jenkins to create your administrator (Admin) user account, and install suggested plugins

  • After installing the suggested plugins, log back into Jenkins with your Admin credentials.

  • Then install the Blue Ocean plugin

Pipeline Setup

  • Create an S3 bucket on AWS to store code artifact from the pipeline

  • Log into your GitHub account and create a repo

  • Create the above files index.html and Jenkins with their respective content in your repo.

  • Modify the code in your Jenkins file to reflect your AWS Region and S3 bucket name

  • Then create a pipeline using Blue Ocean with your GitHub repo

Pipeline Oveview

            GitHub ===> Lint HTML Code ===> S3 Bucket

So Jenkins creates a simple pipeline that pulls down HTML code from GitHub. Then lints the code for errors. If errors are found, Jenkins stops and reports back on why the pipeline fails. However, if no errors are found, Jenkins proceeds to upload the code to an S3 bucket.

License

The contents of this repository are covered under the MIT Licence.

About

Installing and configuring Jenkins on an AWS EC2 Instance and building a Jenkins pipeline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages