Skip to content

Step 19: Project 9 continuous integration pipeline for tooling website

monotiller edited this page Jul 2, 2022 · 2 revisions
Information about screenshots Apologies but I couldn't find a way to change the language of Jenkins from my system language until I found the plugin page later on in this project so for the first few steps the screenshots are not in English but are accompanied by a description of events

Install and configure Jenkins server

Step 1 – Install Jenkins server

First I launched an EC2 instance running Ubuntu 20.04 and then I installed the latest version of Jenkins using the official download just to make sure I had the absolute latest version plus I wanted to run openjdk also to prevent licensing issues:

Then I opened up the port Jenkins uses so that I can access the graphical front end of the application:

Upon visiting the server I was greeted with the installation procedure:

I asked for the suggested plugins and waited for them to install:

I then created the admin user and of course set a secure password (pass):

Step 2 – Configure Jenkins to retrieve source codes from GitHub using Webhooks

Then I added the webhook URL for my Jenkins instance to the webhook section of my forked GitHub repo:

Initially the webhook failed, but retrying it just seemed to work:

Next I created a new "Freestyle project" and added in the link to the git repository under the "source control" section:

Then I saved the pipeline and ran it. It ran successfully:

Next I added on the trigger to run when Jenkins receives the push notification from the webhook. I also added a post-build step that archives all the files

Then, to test, I simply made a change to the readme in the GitHub repository and waited for the build to be triggered and it seemed to run successfully also

Configure Jenkins to copy files to NHS server via SSH

Step 3 – Configure Jenkins to copy files to NFS server via SSH

Next I installed the publish over ssh plugin so that the site can be published to the NFS server

I also found a way to change the language via a plugin so the rest of this write up will be in English now.

Testing the connection to the NFS server was successful:

Then, back in the build actions for the job I added in the send build artifacts over SSH

After making a change in the repository, I then checked the console output of the buld to see that it was successful

Checking the NFS server we can see that all the files have made it across intact

Clone this wiki locally