Introduction to Apache Maven
What is Jenkins?
Jenkins is an open-source automation server written in Java. It helps automate the parts of software
development related to building, testing, and deploying, facilitating continuous integration and continuous
delivery (CI/CD).
Key Features of Jenkins
- Easy installation on major operating systems
- Rich plugin ecosystem to integrate with many tools
- Distributed builds to scale the build/test environment
- Extensible with a vast community support
- Scripted and declarative pipelines
Installing Jenkins
1. Download the Jenkins WAR file from the official site.
2. Run using: `java -jar jenkins.war`
3. Access Jenkins at http://localhost:8080
4. Unlock Jenkins with the password from the initialAdminPassword file.
5. Install suggested plugins or customize.
Jenkins Terminology
- Job: A task or project that Jenkins performs
- Build: The result of running a job
- Node: A machine on which Jenkins runs builds
- Executor: A computational resource for executing builds on a node
- Pipeline: A suite of steps defining the entire build process
Creating Your First Job
Introduction to Apache Maven
1. Click 'New Item' in Jenkins dashboard
2. Enter item name and choose job type (e.g., Freestyle)
3. Configure Source Code Management, build triggers, and build steps
4. Save and click 'Build Now'
Jenkins Pipeline Example
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building...'
stage('Test') {
steps {
echo 'Testing...'
stage('Deploy') {
steps {
echo 'Deploying...'
Conclusion
Jenkins is an essential tool for modern DevOps practices. Its powerful automation capabilities and integration
Introduction to Apache Maven
options make it ideal for building reliable CI/CD pipelines.