Jenkins Essentials
Jenkins Essentials
CI Process in Detail
2. Automation in CI:
• Automation testers also update and push their test scripts to a remote
repository daily.
• Jenkins automatically pulls the latest code from these repositories and
executes the automated tests on it.
Jenkins in Automation:
• Once Jenkins pulls the latest code from the developer’s repository and
creates a build, it then packages the software (preparing it for
deployment).
• After that, Jenkins pulls the automated test scripts from the tester’s
repository and executes them on the build.
• If the automation tests pass, the build is considered certified and ready
for deployment to the production environment.
• The Developer's Role: The developer pushes their latest code changes to
a GitHub repository. Once that happens, Jenkins steps in and pulls the
latest version of the code to begin building the application.
• The Tester's Role: Meanwhile, testers have their automated test scripts
stored in a separate repository. After Jenkins finishes building the code,
it retrieves these test scripts, runs the tests, and checks whether the
new changes meet the required standards.
In this way, developers and testers collaborate effortlessly, ensuring that the
software is continuously built, tested, and ready for deployment.
Steps:
3. Password Generation:
o After running the command for the first time, Jenkins will generate a
temporary password in the console.
o If you miss the password, you can retrieve it from the location
mentioned in the console where it says, "This may also be found
at...".
Unlock Jenkins
• You will be prompted to enter the password you found in the terminal.
• Provide the password to unlock Jenkins.
Install Suggested Plugins
• After the plugins are installed, Jenkins will redirect you to a page where
you need to set up your username, password, and email address.
7. Complete Setup
Jenkins Dashboard
Only the first time you set up Jenkins, it will provide a password to unlock it.
After that, you can start Jenkins by running the following command in the
terminal from the directory where the jenkins.war file is located:
• Open your Terminal and go to the directory where the jenkins.war file is
located.
• Run the following command:
Note: If you close the terminal, the Jenkins process will stop. So, make sure the
terminal stays open while you are working with Jenkins in this mode.
Note: Unlike the .war file, when using the executable file, Jenkins will continue
running in the background even after closing the terminal or the command
window.