This project involves provisioning an EC2 instance on Amazon Web Services (AWS), installing Jenkins, and building a Jenkins pipeline using Blue Ocean plugin.
-
An AWS user account. You may get one here
-
A GitHub user account. Sign up here
-
Ubuntu 18.04 Operating System (OS)
-
Jenkins
-
AWS S3 Bucket
-
HTML code
-
Jenkins file
-
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
-
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
andJenkins
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
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.
The contents of this repository are covered under the MIT Licence.