DEV Community

Cover image for How to configure and install Jenkins in AWS EC2 Ubuntu server to run selenium scripts
Vijayaraghavan Vashudevan for AWS User Group NCR

Posted on • Updated on

How to configure and install Jenkins in AWS EC2 Ubuntu server to run selenium scripts

๐Ÿ“šTable of Content
โˆ˜ โญ-๐’๐ž๐ญ๐ฎ๐ฉ ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ ๐จ๐ง ๐€๐–๐’ ๐„๐‚๐Ÿ ๐ˆ๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž
โˆ˜ โญ-๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐›๐ข๐ง๐š๐ซ๐ฒ ๐š๐ง๐ ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐๐ซ๐ข๐ฏ๐ž๐ซ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โˆ˜ โญ-๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ฆ๐š๐ฏ๐ž๐ง, ๐ฃ๐š๐ฏ๐š ๐š๐ง๐ ๐†๐ข๐ญ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โˆ˜ โญ-๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โˆ˜ โญ-๐‚๐จ๐ง๐Ÿ๐ข๐ ๐ฎ๐ซ๐ž ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ
โˆ˜ โญ-๐„๐ฑ๐ž๐œ๐ฎ๐ญ๐ž ๐ฌ๐ž๐ฅ๐ž๐ง๐ข๐ฎ๐ฆ ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ ๐ญ๐ก๐ซ๐จ๐ฎ๐ ๐ก ๐ก๐ž๐š๐๐ฅ๐ž๐ฌ๐ฌ ๐ฆ๐จ๐๐ž ๐จ๐ง ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ
โˆ˜ ๐Ÿงน-๐ˆ๐ง๐ฌ๐ญ๐ซ๐ฎ๐œ๐ญ๐ข๐จ๐ง๐ฌ ๐ญ๐จ ๐š๐ฏ๐จ๐ข๐ ๐›๐ข๐ฅ๐ฅ๐ข๐ง๐ 

๐ŸŽˆ ๐ˆ๐ง ๐ญ๐ก๐ข๐ฌ ๐ฎ๐ฌ๐ž ๐œ๐š๐ฌ๐ž, ๐ฐ๐ž ๐ฐ๐ข๐ฅ๐ฅ ๐ฌ๐ž๐ž ๐จ๐ง ๐œ๐จ๐ง๐Ÿ๐ข๐ ๐ฎ๐ซ๐ž/๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ ๐ข๐ง ๐€๐–๐’ ๐„๐‚๐Ÿ ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ ๐ญ๐จ ๐ซ๐ฎ๐ง ๐ฒ๐จ๐ฎ๐ซ ๐ฌ๐ž๐ฅ๐ž๐ง๐ข๐ฎ๐ฆ ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ๐ฌ

๐…๐ฅ๐จ๐ฐ ๐ƒ๐ข๐š๐ ๐ซ๐š๐ฆ:

Flow diagram of selenium script in Jenkins(AWS EC2)

โญ๐’๐ž๐ญ๐ฎ๐ฉ ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ ๐จ๐ง ๐€๐–๐’ ๐„๐‚๐Ÿ ๐ˆ๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž
โœ๏ธ ๐†๐จ ๐ญ๐จ ๐€๐–๐’ ๐Œ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐œ๐จ๐ง๐ฌ๐จ๐ฅ๐ž, ๐ฌ๐ž๐š๐ซ๐œ๐ก ๐Ÿ๐จ๐ซ ๐„๐‚๐Ÿ ๐ข๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž ๐ฐ๐ข๐ญ๐ก ๐€๐Œ๐ˆ ๐š๐ฌ ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ & ๐ข๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž ๐ญ๐ฒ๐ฉ๐ž ๐š๐ฌ ๐ญ๐Ÿ ๐ฆ๐ข๐œ๐ซ๐จ

AMI selected
โœ๏ธ ๐‚๐ซ๐ž๐š๐ญ๐ž ๐ญ๐ก๐ž ๐ง๐ž๐ฐ ๐ค๐ž๐ฒ-๐ฉ๐š๐ข๐ซ ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ ๐š๐ง๐ ๐ข๐ง๐œ๐ซ๐ž๐š๐ฌ๐ž ๐ญ๐ก๐ž ๐ฌ๐ญ๐จ๐ซ๐š๐ ๐ž ๐ฌ๐ข๐ณ๐ž ๐š๐ฌ ๐Ÿ๐Ÿ”๐†๐
key-pair generation
โœ๏ธ๐‚๐จ๐ง๐Ÿ๐ข๐ ๐ฎ๐ซ๐ž ๐ญ๐ก๐ž ๐ฌ๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐ ๐ซ๐จ๐ฎ๐ฉ ๐ญ๐จ ๐š๐ฅ๐ฅ๐จ๐ฐ ๐ญ๐ก๐ž ๐›๐ž๐ฅ๐จ๐ฐ ๐ข๐ง๐›๐จ๐ฎ๐ง๐ ๐ซ๐ฎ๐ฅ๐ž๐ฌ

SG Inbound rules
โœ๏ธ ๐‚๐ฅ๐ข๐œ๐ค ๐จ๐ง ๐‹๐š๐ฎ๐ง๐œ๐ก ๐ข๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž ๐š๐ง๐ ๐ฆ๐š๐ค๐ž ๐ฌ๐ฎ๐ซ๐ž ๐ข๐ญ ๐ข๐ฌ ๐ซ๐ฎ๐ง๐ง๐ข๐ง๐  ๐ฌ๐ญ๐š๐ญ๐ž. ๐‚๐ฅ๐ข๐œ๐ค ๐œ๐จ๐ง๐ง๐ž๐œ๐ญ ๐š๐ง๐ ๐ ๐จ ๐ญ๐จ ๐’๐’๐‡ ๐‚๐ฅ๐ข๐ž๐ง๐ญ

Connect to EC2 instance
โœ๏ธ๐†๐จ ๐ญ๐จ ๐ญ๐ก๐ž ๐ฉ๐š๐ญ๐ก ๐ฐ๐ก๐ž๐ซ๐ž ๐ง๐ž๐ฐ ๐ค๐ž๐ฒ-๐ฉ๐š๐ข๐ซ ๐ฌ๐ญ๐จ๐ซ๐ž๐ ๐š๐ง๐ ๐จ๐ฉ๐ž๐ง ๐ญ๐ก๐ž ๐œ๐ฆ๐ ๐ฉ๐ซ๐จ๐ฆ๐ฉ๐ญ ๐ฐ๐ข๐ง๐๐จ๐ฐ ๐š๐ง๐ ๐ฉ๐š๐ฌ๐ญ๐ž ๐ญ๐ก๐ž ๐ฌ๐ฌ๐ก ๐ข๐ ๐œ๐จ๐ฉ๐ข๐ž๐

Connecting through instance -SSH
โญ๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐›๐ข๐ง๐š๐ซ๐ฒ ๐š๐ง๐ ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐๐ซ๐ข๐ฏ๐ž๐ซ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โœ๏ธ ๐ˆ๐ง ๐จ๐ซ๐๐ž๐ซ ๐ญ๐จ ๐ฎ๐ฉ๐๐š๐ญ๐ž ๐š๐ง๐ ๐ฎ๐ฉ๐ ๐ซ๐š๐๐ž ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฉ๐š๐œ๐ค๐š๐ ๐ž๐ฌ. ๐๐ž๐ฅ๐จ๐ฐ ๐š๐ซ๐ž ๐ญ๐ก๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐๐ฌ

sudo apt-get update
sudo apt-get upgrade
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ฎ๐ฉ๐๐š๐ญ๐ž ๐ญ๐ก๐ž ๐Ÿ๐จ๐ง๐ญ๐ฌ ๐š๐ง๐ ๐ญ๐จ ๐๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐ญ๐ก๐ž ๐†๐จ๐จ๐ ๐ฅ๐ž ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐ฉ๐š๐œ๐ค๐š๐ ๐ž

sudo apt-get install -y libappindicator1 fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ฎ๐ง๐ฉ๐š๐œ๐ค ๐ญ๐ก๐ž ๐ฉ๐š๐œ๐ค๐š๐ ๐ž ๐š๐ง๐ ๐ญ๐จ ๐ฎ๐ฉ๐ ๐ซ๐š๐๐ž ๐ญ๐ก๐ž ๐ฉ๐š๐œ๐ค๐š๐ ๐ž๐ฌ

sudo dpkg -i google-chrome*.deb
sudo apt-get install -f
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐ˆ๐ง ๐จ๐ซ๐๐ž๐ซ ๐ญ๐จ ๐œ๐ก๐ž๐œ๐ค ๐ญ๐ก๐ž ๐ ๐จ๐จ๐ ๐ฅ๐ž ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐ฌ๐ฎ๐œ๐œ๐ž๐ฌ๐ฌ๐Ÿ๐ฎ๐ฅ๐ฅ๐ฒ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ๐ž๐. ๐“๐ฒ๐ฉ๐ž ๐ญ๐ก๐ž ๐›๐ž๐ฅ๐จ๐ฐ ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐

Google Chrome version
โœ๏ธ ๐–๐ž ๐ง๐ž๐ž๐ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐๐ซ๐ข๐ฏ๐ž๐ซ ๐ฏ๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐ฌ๐ข๐ฆ๐ข๐ฅ๐š๐ซ ๐ญ๐จ ๐ญ๐ก๐ž ๐›๐ซ๐จ๐ฐ๐ฌ๐ž๐ซ ๐ฉ๐š๐œ๐ค๐š๐ ๐ž ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ๐ž๐

wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chromedriver-linux64.zip
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐“๐จ ๐๐จ๐ฐ๐ง๐ฅ๐จ๐š๐ ๐š๐ง๐ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ฎ๐ง๐ณ๐ข๐ฉ ๐ฉ๐š๐œ๐ค๐š๐ ๐ž ๐š๐ง๐ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ฎ๐ง๐ณ๐ข๐ฉ ๐ญ๐ก๐ž ๐Ÿ๐ข๐ฅ๐ž

sudo apt install unzip
unzip chromedriver-linux64.zip
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ฆ๐จ๐ฏ๐ž ๐ญ๐ก๐ž ๐œ๐ก๐ซ๐จ๐ฆ๐ž-๐๐ซ๐ข๐ฏ๐ž๐ซ ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ข๐ฌ ๐œ๐จ๐ซ๐ซ๐ž๐œ๐ญ ๐ฉ๐š๐ญ๐ก

sudo mv chromedriver /usr/bin/chromedriver
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐ก๐ž๐œ๐ค ๐ญ๐ก๐ž ๐œ๐ก๐ซ๐จ๐ฆ๐ž ๐๐ซ๐ข๐ฏ๐ž๐ซ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ๐ž๐ ๐ฏ๐ž๐ซ๐ฌ๐ข๐จ๐ง ๐ฎ๐ฌ๐ข๐ง๐  ๐ญ๐ก๐ž ๐›๐ž๐ฅ๐จ๐ฐ ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐

chromedriver version

โญ๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ฆ๐š๐ฏ๐ž๐ง, ๐ฃ๐š๐ฏ๐š ๐š๐ง๐ ๐†๐ข๐ญ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฆ๐š๐ฏ๐ž๐ง

sudo apt update
sudo apt install maven
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐œ๐ก๐ž๐œ๐ค ๐ญ๐ก๐ž ๐ฆ๐š๐ฏ๐ž๐ง ๐ฏ๐ž๐ซ๐ฌ๐ข๐จ๐ง

maven version

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฃ๐๐ค ๐ฏ๐ž๐ซ๐ฌ๐ข๐จ๐ง

sudo apt-get install default-jdk
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ ๐ข๐ญ

sudo apt install git
Enter fullscreen mode Exit fullscreen mode

โญ๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ
โœ๏ธ ๐๐ฅ๐ž๐š๐ฌ๐ž ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐Ÿ๐จ๐ฅ๐ฅ๐จ๐ฐ๐ข๐ง๐  ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐๐ฌ ๐ญ๐จ ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ ๐จ๐ง ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ

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
Enter fullscreen mode Exit fullscreen mode

โœ๏ธ ๐˜๐จ๐ฎ ๐ฆ๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ž ๐ญ๐ก๐ž ๐ฃ๐ž๐ง๐ค๐ข๐ง๐ฌ ๐ฌ๐ญ๐š๐ญ๐ฎ๐ฌ ๐š๐ฌ ๐š๐œ๐ญ๐ข๐ฏ๐ž ๐š๐ง๐ ๐ข๐ง ๐ซ๐ฎ๐ง๐ง๐ข๐ง๐  ๐ฌ๐ญ๐š๐ญ๐ž ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ

Jenkins status

โญ๐‚๐จ๐ง๐Ÿ๐ข๐ ๐ฎ๐ซ๐ž ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ
โœ๏ธ ๐Ž๐ฉ๐ž๐ง ๐ญ๐ก๐ž ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ ๐›๐ฒ ๐œ๐จ๐ฉ๐ฒ๐ข๐ง๐  ๐ญ๐ก๐ž ๐ฉ๐ฎ๐›๐ฅ๐ข๐œ ๐ˆ๐๐•๐Ÿ’ ๐š๐๐๐ซ๐ž๐ฌ๐ฌ ๐ฐ๐ข๐ญ๐ก ๐ฉ๐จ๐ซ๐ญ ๐Ÿ–๐ŸŽ๐Ÿ–๐ŸŽ

jenkins server
โœ๏ธ ๐‘๐ฎ๐ง ๐ญ๐ก๐ž ๐›๐ž๐ฅ๐จ๐ฐ ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ญ๐จ ๐ง๐š๐ฏ๐ข๐ ๐š๐ญ๐ž ๐Ÿ๐จ๐ซ ๐ฉ๐š๐ญ๐ก ๐š๐ง๐ ๐œ๐จ๐ฉ๐ฒ๐ข๐ง๐  ๐ญ๐ก๐ž ๐ฉ๐š๐ฌ๐ฌ๐ฐ๐จ๐ซ๐. ๐๐š๐ฌ๐ญ๐ž ๐ข๐ญ ๐ข๐ง ๐š๐๐ฆ๐ข๐ง๐ข๐ฌ๐ญ๐ซ๐š๐ญ๐จ๐ซ ๐ญ๐ž๐ฑ๐ญ ๐›๐จ๐ฑ

jenkins pwd
โœ๏ธ ๐ˆ๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฌ๐ฎ๐ ๐ ๐ž๐ฌ๐ญ๐ž๐ ๐ฉ๐ฅ๐ฎ๐ ๐ข๐ง๐ฌ ๐š๐ฌ ๐ฌ๐ก๐จ๐ฐ๐ง ๐›๐ž๐ฅ๐จ๐ฐ

Jenkins plugins

โœ๏ธ ๐Ž๐ง๐œ๐ž ๐š๐ฅ๐ฅ ๐ญ๐ก๐ž ๐ฉ๐ฅ๐ฎ๐ ๐ข๐ง๐ฌ ๐›๐ž๐ž๐ง ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ๐ž๐. ๐’๐ž๐ญ๐ฎ๐ฉ ๐ญ๐ก๐ž ๐š๐๐ฆ๐ข๐ง ๐œ๐ซ๐ž๐๐ž๐ง๐ญ๐ข๐š๐ฅ๐ฌ.๐‚๐ฅ๐ข๐œ๐ค ๐ฌ๐š๐ฏ๐ž ๐š๐ง๐ ๐Ÿ๐ข๐ง๐ข๐ฌ๐ก. ๐’๐ญ๐š๐ซ๐ญ ๐ฎ๐ฌ๐ข๐ง๐  ๐ฃ๐ž๐ง๐ค๐ข๐ง๐ฌ

Admin credentials
โœ๏ธ ๐†๐จ ๐ญ๐จ ๐ฆ๐š๐ง๐š๐ ๐ž ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ, ๐œ๐ฅ๐ข๐œ๐ค ๐จ๐ง ๐›๐ฎ๐ข๐ฅ๐ ๐ญ๐จ๐จ๐ฅ ๐œ๐จ๐ง๐Ÿ๐ข๐ ๐ฎ๐ซ๐š๐ญ๐ข๐จ๐ง ๐š๐ง๐ ๐ฌ๐ž๐ญ๐ฎ๐ฉ ๐ญ๐ก๐ž ๐ฉ๐š๐ญ๐ก ๐Ÿ๐จ๐ซ ๐‰๐ƒ๐Š, ๐†๐ˆ๐“ ๐š๐ง๐ ๐ฆ๐š๐ฏ๐ž๐ง ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ

JDK config

Git config

maven config

โญ๐„๐ฑ๐ž๐œ๐ฎ๐ญ๐ž ๐ฌ๐ž๐ฅ๐ž๐ง๐ข๐ฎ๐ฆ ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ ๐ญ๐ก๐ซ๐จ๐ฎ๐ ๐ก ๐ก๐ž๐š๐๐ฅ๐ž๐ฌ๐ฌ ๐ฆ๐จ๐๐ž ๐จ๐ง ๐‰๐ž๐ง๐ค๐ข๐ง๐ฌ

โœ๏ธ ๐†๐จ ๐ญ๐จ ๐๐ž๐ฐ ๐ข๐ญ๐ž๐ฆ, ๐ž๐ง๐ญ๐ž๐ซ ๐ญ๐ก๐ž ๐ข๐ญ๐ž๐ฆ ๐ง๐š๐ฆ๐ž ๐š๐ง๐ ๐ฉ๐ซ๐จ๐ฃ๐ž๐œ๐ญ ๐š๐ฌ ๐…๐ซ๐ž๐ž๐ฌ๐ญ๐ฒ๐ฅ๐ž ๐ฉ๐ซ๐จ๐ฃ๐ž๐œ๐ญ ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ

Freestyle project

โœ๏ธ ๐†๐จ ๐ญ๐จ ๐ฌ๐จ๐ฎ๐ซ๐œ๐ž ๐œ๐จ๐๐ž ๐ฆ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ, ๐ ๐ข๐ฏ๐ž ๐ญ๐ก๐ž ๐ซ๐ž๐ฉ๐จ๐ฌ๐ข๐ญ๐จ๐ซ๐ฒ ๐”๐‘๐‹ ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ

Source code

โœ๏ธ ๐†๐จ ๐ญ๐จ ๐›๐ฎ๐ข๐ฅ๐ ๐ฌ๐ญ๐ž๐ฉ, ๐ข๐ง๐ฏ๐จ๐ค๐ž ๐ญ๐ก๐ž ๐ญ๐š๐ซ๐ ๐ž๐ญ ๐š๐ฌ ๐ฆ๐š๐ฏ๐ž๐ง ๐š๐ง๐ ๐ ๐ข๐ฏ๐ž ๐ญ๐ก๐ž ๐ ๐จ๐š๐ฅ ๐š๐ฌ ๐œ๐ฅ๐ž๐š๐ง ๐ข๐ง๐ฌ๐ญ๐š๐ฅ๐ฅ

maven build step

โœ๏ธ ๐†๐จ ๐ญ๐จ ๐ข๐ญ๐ž๐ฆ ๐๐š๐ฌ๐ก๐›๐จ๐š๐ซ๐, ๐œ๐ฅ๐ข๐œ๐ค ๐จ๐ง ๐ญ๐ก๐ž ๐ฉ๐ฅ๐š๐ฒ ๐›๐ฎ๐ญ๐ญ๐จ๐ง ๐ญ๐จ ๐ซ๐ฎ๐ง ๐ฒ๐จ๐ฎ๐ซ ๐›๐ฎ๐ข๐ฅ๐ ๐ฃ๐จ๐›

Build job
โœ๏ธ ๐˜๐จ๐ฎ ๐œ๐ก๐ž๐œ๐ค ๐ญ๐ก๐ž ๐›๐ฎ๐ข๐ฅ๐ ๐ฌ๐ญ๐š๐ญ๐ฎ๐ฌ ๐š๐ง๐ ๐œ๐จ๐ง๐ฌ๐จ๐ฅ๐ž ๐š๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ

Jenkins server

โœ๏ธ ๐๐ž๐ฅ๐จ๐ฐ ๐š๐ซ๐ž ๐ญ๐ก๐ž ๐œ๐ก๐š๐ง๐ ๐ž๐ฌ ๐ญ๐จ ๐›๐ž ๐๐จ๐ง๐ž ๐ข๐ง ๐ฒ๐จ๐ฎ๐ซ ๐ญ๐ž๐ฌ๐ญ ๐ฃ๐š๐ฏ๐š ๐œ๐ฅ๐š๐ฌ๐ฌ ๐Ÿ๐ข๐ฅ๐ž

 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());
    }
Enter fullscreen mode Exit fullscreen mode

๐Ÿงน ๐ˆ๐ง๐ฌ๐ญ๐ซ๐ฎ๐œ๐ญ๐ข๐จ๐ง๐ฌ ๐ญ๐จ ๐š๐ฏ๐จ๐ข๐ ๐›๐ข๐ฅ๐ฅ๐ข๐ง๐ 

โ™ป ๐“๐ž๐ซ๐ฆ๐ข๐ง๐š๐ญ๐ž ๐ฒ๐จ๐ฎ๐ซ ๐„๐‚๐Ÿ ๐ข๐ง๐ฌ๐ญ๐š๐ง๐œ๐ž ๐จ๐ง๐œ๐ž ๐๐จ๐ง๐ž ๐ฐ๐ข๐ญ๐ก ๐ž๐ฑ๐ž๐ซ๐œ๐ข๐ฌ๐ž

EC2 Instance

๐“๐ก๐š๐ง๐ค๐ฌ ๐Ÿ๐จ๐ซ ๐›๐ž๐ข๐ง๐  ๐ฉ๐š๐ญ๐ข๐ž๐ง๐ญ ๐š๐ง๐ ๐Ÿ๐จ๐ฅ๐ฅ๐จ๐ฐ๐ž๐ ๐ฆ๐ž. ๐Š๐ž๐ž๐ฉ ๐ฌ๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ๐ข๐ง๐  ๐Ÿ™

๐‚๐ฅ๐š๐ฉ๐Ÿ‘ ๐ข๐Ÿ ๐ฒ๐จ๐ฎ ๐ฅ๐ข๐ค๐ž๐ ๐ญ๐ก๐ž ๐›๐ฅ๐จ๐ 

๐…๐จ๐ซ ๐ฆ๐จ๐ซ๐ž ๐ž๐ฑ๐ž๐ซ๐œ๐ข๐ฌ๐ž๐ฌ โ€” ๐ฉ๐ฅ๐ฌ ๐๐จ ๐Ÿ๐จ๐ฅ๐ฅ๐จ๐ฐ ๐ฆ๐ž ๐›๐ž๐ฅ๐จ๐ฐ โœ…

๐ก๐ญ๐ญ๐ฉ๐ฌ://๐ฐ๐ฐ๐ฐ.๐ฅ๐ข๐ง๐ค๐ž๐๐ข๐ง.๐œ๐จ๐ฆ/๐ข๐ง/๐ฏ๐ข๐ฃ๐š๐ฒ๐š๐ซ๐š๐ ๐ก๐š๐ฏ๐š๐ง๐ฏ๐š๐ฌ๐ก๐ฎ๐๐ž๐ฏ๐š๐ง/

Top comments (0)