How to configure and install Jenkins in AWS EC2 Ubuntu server to run selenium scripts
Tags: aws, ubuntu, jenkins, selenium
Published: 2023-10-28 09:22:43

**📚Table of Content**
∘ ⭐-[𝐒𝐞𝐭𝐮𝐩 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 𝐨𝐧 𝐀𝐖𝐒 𝐄𝐂𝟐 𝐈𝐧𝐬𝐭𝐚𝐧𝐜𝐞](#𝐒𝐞𝐭𝐮𝐩 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 𝐨𝐧 𝐀𝐖𝐒 𝐄𝐂𝟐 𝐈𝐧𝐬𝐭𝐚𝐧𝐜𝐞)
∘ ⭐-[𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐜𝐡𝐫𝐨𝐦𝐞 𝐛𝐢𝐧𝐚𝐫𝐲 𝐚𝐧𝐝 𝐜𝐡𝐫𝐨𝐦𝐞 𝐝𝐫𝐢𝐯𝐞𝐫 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫](#𝐒𝐞𝐭𝐮𝐩 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 𝐨𝐧 𝐀𝐖𝐒 𝐄𝐂𝟐 𝐈𝐧𝐬𝐭𝐚𝐧𝐜𝐞)
∘ ⭐-[𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐦𝐚𝐯𝐞𝐧, 𝐣𝐚𝐯𝐚 𝐚𝐧𝐝 𝐆𝐢𝐭 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫](#𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐦𝐚𝐯𝐞𝐧, 𝐣𝐚𝐯𝐚 𝐚𝐧𝐝 𝐆𝐢𝐭 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫)
∘ ⭐-[𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫](#𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫)
∘ ⭐-[𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐞 𝐉𝐞𝐧𝐤𝐢𝐧𝐬](#𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐞 𝐉𝐞𝐧𝐤𝐢𝐧𝐬)
∘ ⭐-[𝐄𝐱𝐞𝐜𝐮𝐭𝐞 𝐬𝐞𝐥𝐞𝐧𝐢𝐮𝐦 𝐬𝐜𝐫𝐢𝐩𝐭 𝐭𝐡𝐫𝐨𝐮𝐠𝐡 𝐡𝐞𝐚𝐝𝐥𝐞𝐬𝐬 𝐦𝐨𝐝𝐞 𝐨𝐧 𝐉𝐞𝐧𝐤𝐢𝐧𝐬](#𝐄𝐱𝐞𝐜𝐮𝐭𝐞 𝐬𝐞𝐥𝐞𝐧𝐢𝐮𝐦 𝐬𝐜𝐫𝐢𝐩𝐭 𝐭𝐡𝐫𝐨𝐮𝐠𝐡 𝐡𝐞𝐚𝐝𝐥𝐞𝐬𝐬 𝐦𝐨𝐝𝐞 𝐨𝐧 𝐉𝐞𝐧𝐤𝐢𝐧𝐬)
∘ 🧹-[𝐈𝐧𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐨𝐧𝐬 𝐭𝐨 𝐚𝐯𝐨𝐢𝐝 𝐛𝐢𝐥𝐥𝐢𝐧𝐠](#𝐈𝐧𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐨𝐧𝐬 𝐭𝐨 𝐚𝐯𝐨𝐢𝐝 𝐛𝐢𝐥𝐥𝐢𝐧𝐠)

> 🎈 𝐈𝐧 𝐭𝐡𝐢𝐬 𝐮𝐬𝐞 𝐜𝐚𝐬𝐞, 𝐰𝐞 𝐰𝐢𝐥𝐥 𝐬𝐞𝐞 𝐨𝐧 𝐜𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐞/𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐢𝐧 𝐀𝐖𝐒 𝐄𝐂𝟐 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 𝐭𝐨 𝐫𝐮𝐧 𝐲𝐨𝐮𝐫 𝐬𝐞𝐥𝐞𝐧𝐢𝐮𝐦 𝐬𝐜𝐫𝐢𝐩𝐭𝐬

**<u>𝐅𝐥𝐨𝐰 𝐃𝐢𝐚𝐠𝐫𝐚𝐦:</u>**

![Flow diagram of selenium script in Jenkins(AWS EC2)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4gxtr1r3n2mkojqkn07.gif)

⭐𝐒𝐞𝐭𝐮𝐩 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 𝐨𝐧 𝐀𝐖𝐒 𝐄𝐂𝟐 𝐈𝐧𝐬𝐭𝐚𝐧𝐜𝐞
✍️ 𝐆𝐨 𝐭𝐨 𝐀𝐖𝐒 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐜𝐨𝐧𝐬𝐨𝐥𝐞, 𝐬𝐞𝐚𝐫𝐜𝐡 𝐟𝐨𝐫 𝐄𝐂𝟐 𝐢𝐧𝐬𝐭𝐚𝐧𝐜𝐞 𝐰𝐢𝐭𝐡 𝐀𝐌𝐈 𝐚𝐬 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫 & 𝐢𝐧𝐬𝐭𝐚𝐧𝐜𝐞 𝐭𝐲𝐩𝐞 𝐚𝐬 𝐭𝟐 𝐦𝐢𝐜𝐫𝐨

![AMI selected](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xigd3wfqa9fmmc1dlv17.png)
✍️ 𝐂𝐫𝐞𝐚𝐭𝐞 𝐭𝐡𝐞 𝐧𝐞𝐰 𝐤𝐞𝐲-𝐩𝐚𝐢𝐫 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰 𝐚𝐧𝐝 𝐢𝐧𝐜𝐫𝐞𝐚𝐬𝐞 𝐭𝐡𝐞 𝐬𝐭𝐨𝐫𝐚𝐠𝐞 𝐬𝐢𝐳𝐞 𝐚𝐬 𝟏𝟔𝐆𝐁
![key-pair generation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awstclksvjri1aftl312.png)
✍️𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐞 𝐭𝐡𝐞 𝐬𝐞𝐜𝐮𝐫𝐢𝐭𝐲 𝐠𝐫𝐨𝐮𝐩 𝐭𝐨 𝐚𝐥𝐥𝐨𝐰 𝐭𝐡𝐞 𝐛𝐞𝐥𝐨𝐰 𝐢𝐧𝐛𝐨𝐮𝐧𝐝 𝐫𝐮𝐥𝐞𝐬

![SG Inbound rules](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cojs1l9le817b02e44fg.png)
✍️ 𝐂𝐥𝐢𝐜𝐤 𝐨𝐧 𝐋𝐚𝐮𝐧𝐜𝐡 𝐢𝐧𝐬𝐭𝐚𝐧𝐜𝐞 𝐚𝐧𝐝 𝐦𝐚𝐤𝐞 𝐬𝐮𝐫𝐞 𝐢𝐭 𝐢𝐬 𝐫𝐮𝐧𝐧𝐢𝐧𝐠 𝐬𝐭𝐚𝐭𝐞. 𝐂𝐥𝐢𝐜𝐤 𝐜𝐨𝐧𝐧𝐞𝐜𝐭 𝐚𝐧𝐝 𝐠𝐨 𝐭𝐨 𝐒𝐒𝐇 𝐂𝐥𝐢𝐞𝐧𝐭

![Connect to EC2 instance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fx4at82ixz3sdbts3qp4.png)
✍️𝐆𝐨 𝐭𝐨 𝐭𝐡𝐞 𝐩𝐚𝐭𝐡 𝐰𝐡𝐞𝐫𝐞 𝐧𝐞𝐰 𝐤𝐞𝐲-𝐩𝐚𝐢𝐫 𝐬𝐭𝐨𝐫𝐞𝐝 𝐚𝐧𝐝 𝐨𝐩𝐞𝐧 𝐭𝐡𝐞 𝐜𝐦𝐝 𝐩𝐫𝐨𝐦𝐩𝐭 𝐰𝐢𝐧𝐝𝐨𝐰 𝐚𝐧𝐝 𝐩𝐚𝐬𝐭𝐞 𝐭𝐡𝐞 𝐬𝐬𝐡 𝐢𝐝 𝐜𝐨𝐩𝐢𝐞𝐝

![Connecting through instance -SSH](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6w23qfzh2suzvom7mia.gif)
⭐𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐜𝐡𝐫𝐨𝐦𝐞 𝐛𝐢𝐧𝐚𝐫𝐲 𝐚𝐧𝐝 𝐜𝐡𝐫𝐨𝐦𝐞 𝐝𝐫𝐢𝐯𝐞𝐫 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫
✍️ 𝐈𝐧 𝐨𝐫𝐝𝐞𝐫 𝐭𝐨 𝐮𝐩𝐝𝐚𝐭𝐞 𝐚𝐧𝐝 𝐮𝐩𝐠𝐫𝐚𝐝𝐞 𝐚𝐥𝐥 𝐭𝐡𝐞 𝐩𝐚𝐜𝐤𝐚𝐠𝐞𝐬. 𝐁𝐞𝐥𝐨𝐰 𝐚𝐫𝐞 𝐭𝐡𝐞 𝐜𝐨𝐦𝐦𝐚𝐧𝐝𝐬

```
sudo apt-get update
sudo apt-get upgrade
```
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐮𝐩𝐝𝐚𝐭𝐞 𝐭𝐡𝐞 𝐟𝐨𝐧𝐭𝐬 𝐚𝐧𝐝 𝐭𝐨 𝐝𝐨𝐰𝐧𝐥𝐨𝐚𝐝 𝐭𝐡𝐞 𝐆𝐨𝐨𝐠𝐥𝐞 𝐜𝐡𝐫𝐨𝐦𝐞 𝐩𝐚𝐜𝐤𝐚𝐠𝐞

```
sudo apt-get install -y libappindicator1 fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
```
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐮𝐧𝐩𝐚𝐜𝐤 𝐭𝐡𝐞 𝐩𝐚𝐜𝐤𝐚𝐠𝐞 𝐚𝐧𝐝 𝐭𝐨 𝐮𝐩𝐠𝐫𝐚𝐝𝐞 𝐭𝐡𝐞 𝐩𝐚𝐜𝐤𝐚𝐠𝐞𝐬

```
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f
```
✍️ 𝐈𝐧 𝐨𝐫𝐝𝐞𝐫 𝐭𝐨 𝐜𝐡𝐞𝐜𝐤 𝐭𝐡𝐞 𝐠𝐨𝐨𝐠𝐥𝐞 𝐜𝐡𝐫𝐨𝐦𝐞 𝐬𝐮𝐜𝐜𝐞𝐬𝐬𝐟𝐮𝐥𝐥𝐲 𝐢𝐧𝐬𝐭𝐚𝐥𝐥𝐞𝐝. 𝐓𝐲𝐩𝐞 𝐭𝐡𝐞 𝐛𝐞𝐥𝐨𝐰 𝐜𝐨𝐦𝐦𝐚𝐧𝐝

![Google Chrome version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zrnwn4bkvh4diyjy11g4.gif)
✍️ 𝐖𝐞 𝐧𝐞𝐞𝐝 𝐭𝐨 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐜𝐡𝐫𝐨𝐦𝐞 𝐝𝐫𝐢𝐯𝐞𝐫 𝐯𝐞𝐫𝐬𝐢𝐨𝐧 𝐬𝐢𝐦𝐢𝐥𝐚𝐫 𝐭𝐨 𝐭𝐡𝐞 𝐛𝐫𝐨𝐰𝐬𝐞𝐫 𝐩𝐚𝐜𝐤𝐚𝐠𝐞 𝐢𝐧𝐬𝐭𝐚𝐥𝐥𝐞𝐝

```
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chromedriver-linux64.zip
```
✍️ 𝐓𝐨 𝐝𝐨𝐰𝐧𝐥𝐨𝐚𝐝 𝐚𝐧𝐝 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐮𝐧𝐳𝐢𝐩 𝐩𝐚𝐜𝐤𝐚𝐠𝐞 𝐚𝐧𝐝 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐮𝐧𝐳𝐢𝐩 𝐭𝐡𝐞 𝐟𝐢𝐥𝐞

```
sudo apt install unzip
unzip chromedriver-linux64.zip
```
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐦𝐨𝐯𝐞 𝐭𝐡𝐞 𝐜𝐡𝐫𝐨𝐦𝐞-𝐝𝐫𝐢𝐯𝐞𝐫 𝐢𝐧𝐭𝐨 𝐭𝐡𝐢𝐬 𝐜𝐨𝐫𝐫𝐞𝐜𝐭 𝐩𝐚𝐭𝐡

```
sudo mv chromedriver /usr/bin/chromedriver
```
✍️ 𝐂𝐡𝐞𝐜𝐤 𝐭𝐡𝐞 𝐜𝐡𝐫𝐨𝐦𝐞 𝐝𝐫𝐢𝐯𝐞𝐫 𝐢𝐧𝐬𝐭𝐚𝐥𝐥𝐞𝐝 𝐯𝐞𝐫𝐬𝐢𝐨𝐧 𝐮𝐬𝐢𝐧𝐠 𝐭𝐡𝐞 𝐛𝐞𝐥𝐨𝐰 𝐜𝐨𝐦𝐦𝐚𝐧𝐝

![chromedriver version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4d6fk9ff0isuz5gdjod3.png)

⭐𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐦𝐚𝐯𝐞𝐧, 𝐣𝐚𝐯𝐚 𝐚𝐧𝐝 𝐆𝐢𝐭 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐦𝐚𝐯𝐞𝐧

```
sudo apt update
sudo apt install maven
```
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐜𝐡𝐞𝐜𝐤 𝐭𝐡𝐞 𝐦𝐚𝐯𝐞𝐧 𝐯𝐞𝐫𝐬𝐢𝐨𝐧

![maven version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djwpze5ox237xb66ppl8.gif)

✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐣𝐝𝐤 𝐯𝐞𝐫𝐬𝐢𝐨𝐧

```
sudo apt-get install default-jdk
```
✍️ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐠𝐢𝐭

```
sudo apt install git
```
⭐𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫
✍️ 𝐏𝐥𝐞𝐚𝐬𝐞 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐟𝐨𝐥𝐥𝐨𝐰𝐢𝐧𝐠 𝐜𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐭𝐨 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐨𝐧 𝐔𝐛𝐮𝐧𝐭𝐮 𝐬𝐞𝐫𝐯𝐞𝐫

```
sudo apt update

sudo apt install openjdk-17-jre

java -version
 
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

sudo apt-get update

sudo apt-get install jenkins

sudo systemctl start jenkins.service

sudo systemctl status jenkins
```
✍️ 𝐘𝐨𝐮 𝐦𝐮𝐬𝐭 𝐬𝐞𝐞 𝐭𝐡𝐞 𝐣𝐞𝐧𝐤𝐢𝐧𝐬 𝐬𝐭𝐚𝐭𝐮𝐬 𝐚𝐬 𝐚𝐜𝐭𝐢𝐯𝐞 𝐚𝐧𝐝 𝐢𝐧 𝐫𝐮𝐧𝐧𝐢𝐧𝐠 𝐬𝐭𝐚𝐭𝐞 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰

![Jenkins status](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bc23nado8p0ai74jafkh.png)

⭐𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐞 𝐉𝐞𝐧𝐤𝐢𝐧𝐬
✍️ 𝐎𝐩𝐞𝐧 𝐭𝐡𝐞 𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐛𝐲 𝐜𝐨𝐩𝐲𝐢𝐧𝐠 𝐭𝐡𝐞 𝐩𝐮𝐛𝐥𝐢𝐜 𝐈𝐏𝐕𝟒 𝐚𝐝𝐝𝐫𝐞𝐬𝐬 𝐰𝐢𝐭𝐡 𝐩𝐨𝐫𝐭 𝟖𝟎𝟖𝟎

![jenkins server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d070wokiyj9wbhnx97pf.png)
✍️ 𝐑𝐮𝐧 𝐭𝐡𝐞 𝐛𝐞𝐥𝐨𝐰 𝐜𝐨𝐦𝐦𝐚𝐧𝐝 𝐭𝐨 𝐧𝐚𝐯𝐢𝐠𝐚𝐭𝐞 𝐟𝐨𝐫 𝐩𝐚𝐭𝐡 𝐚𝐧𝐝 𝐜𝐨𝐩𝐲𝐢𝐧𝐠 𝐭𝐡𝐞 𝐩𝐚𝐬𝐬𝐰𝐨𝐫𝐝. 𝐏𝐚𝐬𝐭𝐞 𝐢𝐭 𝐢𝐧 𝐚𝐝𝐦𝐢𝐧𝐢𝐬𝐭𝐫𝐚𝐭𝐨𝐫 𝐭𝐞𝐱𝐭 𝐛𝐨𝐱

![jenkins pwd](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68nfunv6w4b3u1p2fief.png)
✍️ 𝐈𝐧𝐬𝐭𝐚𝐥𝐥 𝐭𝐡𝐞 𝐬𝐮𝐠𝐠𝐞𝐬𝐭𝐞𝐝 𝐩𝐥𝐮𝐠𝐢𝐧𝐬 𝐚𝐬 𝐬𝐡𝐨𝐰𝐧 𝐛𝐞𝐥𝐨𝐰

![Jenkins plugins](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebby7juxvtdk07fqsu9w.png)

✍️ 𝐎𝐧𝐜𝐞 𝐚𝐥𝐥 𝐭𝐡𝐞 𝐩𝐥𝐮𝐠𝐢𝐧𝐬 𝐛𝐞𝐞𝐧 𝐢𝐧𝐬𝐭𝐚𝐥𝐥𝐞𝐝. 𝐒𝐞𝐭𝐮𝐩 𝐭𝐡𝐞 𝐚𝐝𝐦𝐢𝐧 𝐜𝐫𝐞𝐝𝐞𝐧𝐭𝐢𝐚𝐥𝐬.𝐂𝐥𝐢𝐜𝐤 𝐬𝐚𝐯𝐞 𝐚𝐧𝐝 𝐟𝐢𝐧𝐢𝐬𝐡. 𝐒𝐭𝐚𝐫𝐭 𝐮𝐬𝐢𝐧𝐠 𝐣𝐞𝐧𝐤𝐢𝐧𝐬

![Admin credentials](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ja11z7edmhm3ow89gy5c.png)
✍️ 𝐆𝐨 𝐭𝐨 𝐦𝐚𝐧𝐚𝐠𝐞 𝐉𝐞𝐧𝐤𝐢𝐧𝐬, 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 𝐛𝐮𝐢𝐥𝐝 𝐭𝐨𝐨𝐥 𝐜𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧 𝐚𝐧𝐝 𝐬𝐞𝐭𝐮𝐩 𝐭𝐡𝐞 𝐩𝐚𝐭𝐡 𝐟𝐨𝐫 𝐉𝐃𝐊, 𝐆𝐈𝐓 𝐚𝐧𝐝 𝐦𝐚𝐯𝐞𝐧 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰

![JDK config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/820rvcd0tnmpy94nlzix.png)

![Git config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a5ki124vb0r5cspp2qyn.png)

![maven config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnzw1bovzwadciui8an5.png)

⭐𝐄𝐱𝐞𝐜𝐮𝐭𝐞 𝐬𝐞𝐥𝐞𝐧𝐢𝐮𝐦 𝐬𝐜𝐫𝐢𝐩𝐭 𝐭𝐡𝐫𝐨𝐮𝐠𝐡 𝐡𝐞𝐚𝐝𝐥𝐞𝐬𝐬 𝐦𝐨𝐝𝐞 𝐨𝐧 𝐉𝐞𝐧𝐤𝐢𝐧𝐬

✍️ 𝐆𝐨 𝐭𝐨 𝐍𝐞𝐰 𝐢𝐭𝐞𝐦, 𝐞𝐧𝐭𝐞𝐫 𝐭𝐡𝐞 𝐢𝐭𝐞𝐦 𝐧𝐚𝐦𝐞 𝐚𝐧𝐝 𝐩𝐫𝐨𝐣𝐞𝐜𝐭 𝐚𝐬 𝐅𝐫𝐞𝐞𝐬𝐭𝐲𝐥𝐞 𝐩𝐫𝐨𝐣𝐞𝐜𝐭 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰

![Freestyle project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vxnqby0lrnos0xdnhz1o.png)

✍️ 𝐆𝐨 𝐭𝐨 𝐬𝐨𝐮𝐫𝐜𝐞 𝐜𝐨𝐝𝐞 𝐦𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭, 𝐠𝐢𝐯𝐞 𝐭𝐡𝐞 𝐫𝐞𝐩𝐨𝐬𝐢𝐭𝐨𝐫𝐲 𝐔𝐑𝐋 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰

![Source code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/094x583gi7u7eme1252o.png)

✍️ 𝐆𝐨 𝐭𝐨 𝐛𝐮𝐢𝐥𝐝 𝐬𝐭𝐞𝐩, 𝐢𝐧𝐯𝐨𝐤𝐞 𝐭𝐡𝐞 𝐭𝐚𝐫𝐠𝐞𝐭 𝐚𝐬 𝐦𝐚𝐯𝐞𝐧 𝐚𝐧𝐝 𝐠𝐢𝐯𝐞 𝐭𝐡𝐞 𝐠𝐨𝐚𝐥 𝐚𝐬 𝐜𝐥𝐞𝐚𝐧 𝐢𝐧𝐬𝐭𝐚𝐥𝐥

![maven build step](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yd1v3mh5nuadbjezgqjm.png)

✍️ 𝐆𝐨 𝐭𝐨 𝐢𝐭𝐞𝐦 𝐝𝐚𝐬𝐡𝐛𝐨𝐚𝐫𝐝, 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 𝐭𝐡𝐞 𝐩𝐥𝐚𝐲 𝐛𝐮𝐭𝐭𝐨𝐧 𝐭𝐨 𝐫𝐮𝐧 𝐲𝐨𝐮𝐫 𝐛𝐮𝐢𝐥𝐝 𝐣𝐨𝐛

![Build job](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aemud6c15ztmaon18vy6.png)
✍️ 𝐘𝐨𝐮 𝐜𝐡𝐞𝐜𝐤 𝐭𝐡𝐞 𝐛𝐮𝐢𝐥𝐝 𝐬𝐭𝐚𝐭𝐮𝐬 𝐚𝐧𝐝 𝐜𝐨𝐧𝐬𝐨𝐥𝐞 𝐚𝐬 𝐛𝐞𝐥𝐨𝐰

![Jenkins server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5wl1kcodiyuw5hirouv8.png)

✍️ 𝐁𝐞𝐥𝐨𝐰 𝐚𝐫𝐞 𝐭𝐡𝐞 𝐜𝐡𝐚𝐧𝐠𝐞𝐬 𝐭𝐨 𝐛𝐞 𝐝𝐨𝐧𝐞 𝐢𝐧 𝐲𝐨𝐮𝐫 𝐭𝐞𝐬𝐭 𝐣𝐚𝐯𝐚 𝐜𝐥𝐚𝐬𝐬 𝐟𝐢𝐥𝐞

```
 public void OpenBrowser()  {
        WebDriver driver;
        System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
        ChromeOptions options = new ChromeOptions();
        options.addArguments("headless");
        options.addArguments("disable-gpu");
        driver = new ChromeDriver(options);
        driver.get("https://selectorshub.com/");
        System.out.println("Title of the page is: " + driver.getTitle());
    }
```

🧹 𝐈𝐧𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐨𝐧𝐬 𝐭𝐨 𝐚𝐯𝐨𝐢𝐝 𝐛𝐢𝐥𝐥𝐢𝐧𝐠

♻ 𝐓𝐞𝐫𝐦𝐢𝐧𝐚𝐭𝐞 𝐲𝐨𝐮𝐫 𝐄𝐂𝟐 𝐢𝐧𝐬𝐭𝐚𝐧𝐜𝐞 𝐨𝐧𝐜𝐞 𝐝𝐨𝐧𝐞 𝐰𝐢𝐭𝐡 𝐞𝐱𝐞𝐫𝐜𝐢𝐬𝐞

![EC2 Instance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5qasxap7xlyfhxqptwux.png)

𝐓𝐡𝐚𝐧𝐤𝐬 𝐟𝐨𝐫 𝐛𝐞𝐢𝐧𝐠 𝐩𝐚𝐭𝐢𝐞𝐧𝐭 𝐚𝐧𝐝 𝐟𝐨𝐥𝐥𝐨𝐰𝐞𝐝 𝐦𝐞. 𝐊𝐞𝐞𝐩 𝐬𝐮𝐩𝐩𝐨𝐫𝐭𝐢𝐧𝐠 🙏

𝐂𝐥𝐚𝐩👏 𝐢𝐟 𝐲𝐨𝐮 𝐥𝐢𝐤𝐞𝐝 𝐭𝐡𝐞 𝐛𝐥𝐨𝐠

𝐅𝐨𝐫 𝐦𝐨𝐫𝐞 𝐞𝐱𝐞𝐫𝐜𝐢𝐬𝐞𝐬 — 𝐩𝐥𝐬 𝐝𝐨 𝐟𝐨𝐥𝐥𝐨𝐰 𝐦𝐞 𝐛𝐞𝐥𝐨𝐰 ✅

𝐡𝐭𝐭𝐩𝐬://𝐰𝐰𝐰.𝐥𝐢𝐧𝐤𝐞𝐝𝐢𝐧.𝐜𝐨𝐦/𝐢𝐧/𝐯𝐢𝐣𝐚𝐲𝐚𝐫𝐚𝐠𝐡𝐚𝐯𝐚𝐧𝐯𝐚𝐬𝐡𝐮𝐝𝐞𝐯𝐚𝐧/