This report documents the creation of a Jenkins Freestyle project with GitHub integration and automated webhook triggers. All steps include verification checkpoints and the actual outcomes.
- Jenkins Server: The project was executed on a server running at
http://your-server-ip:8080. - GitHub Account: A GitHub account with repository creation permissions was used.
- Network Access: The Jenkins server was configured to be accessible from GitHub webhooks.
First, I navigated to the Jenkins URL, logged in with admin credentials, and verified the dashboard displayed successfully.
Expected: Main dashboard with "New Item" visible in left menu
A new project was started by clicking "New Item". I entered the job name my-first-job, selected "Freestyle project", and clicked "OK".
Expected: Job creation form with name field and project type selection
On the configuration page, I added the description "First Jenkins freestyle project for CI/CD automation" and saved the configuration, leaving the other settings at their defaults.
Expected: Configuration page with multiple sections (General, Source Code Management, Build Triggers, etc.)
Returning to the dashboard, my-first-job was visible in the project list with an initial status of "Never built".
Expected: Dashboard showing newly created job in project list
I logged into GitHub and created a new repository named jenkins-scm, initializing it with a README file.
Expected: New repository with README.md file visible
The HTTPS URL for the new repository (https://github.com/username/jenkins-scm.git) was copied for use in the Jenkins configuration.
Expected: Repository page with clone URL visible
In the my-first-job configuration, I navigated to the "Source Code Management" section, selected "Git", and pasted the copied repository URL. The "Branch Specifier" was left as */main.
Expected: Git configuration section with repository URL filled
After saving the SCM configuration, I initiated a manual build by clicking "Build Now" from the job page.
Expected: Build #1 appears in build history
I checked the "Console Output" for the first build and confirmed that the repository checkout was successful.
Expected: Console showing successful Git clone and checkout completion
The following output confirms a successful connection and checkout from the GitHub repository.
Started by user admin
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/my-first-job
The recommended git tool is: NONE
using credential
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/my-first-job/.git
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/username/jenkins-scm.git
Fetching upstream changes from https://github.com/username/jenkins-scm.git
> git --version
> git --version
> git fetch --tags --force --progress -- https://github.com/username/jenkins-scm.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/main^{commit}
Checking out Revision abc123def456 (refs/remotes/origin/main)
> git config core.sparsecheckout
> git checkout -f abc123def456
Commit message: "Initial commit"
First time build. Skipping changelog.
Finished: SUCCESS
In the my-first-job configuration, under the "Build Triggers" section, I checked the box for "GitHub hook trigger for GITScm polling" and saved the change.
Expected: Build Triggers section with GitHub webhook option enabled
In the GitHub repository's Settings, under "Webhooks", I added a new webhook. The configuration was as follows:
- Payload URL:
http://jenkins-ip:8080/github-webhook/ - Content type:
application/json - Events: "Just the push event" was selected.
- Active: The webhook was set to active.
Expected: Webhook configuration form with Jenkins payload URL
To test the webhook, I edited the README.md file directly in the GitHub repository and committed the change to the main branch.
Expected: GitHub file editor with changes ready to commit
Upon returning to the Jenkins dashboard, a new build for my-first-job had been triggered automatically by the push to the GitHub repository.
Expected: New build (#2) appears automatically in build history
This section documents potential issues and their resolutions based on the implementation.
Symptoms: Error message when clicking "OK" Solutions:
- Verify Jenkins has sufficient disk space
- Check job name contains only valid characters (letters, numbers, hyphens)
- Restart Jenkins service if persistent issues occur
Symptoms: "Failed to connect to repository" error Solutions:
- Verify repository URL syntax:
https://github.com/username/repo.git - Check repository visibility (public vs private)
- Configure GitHub credentials in Jenkins if repository is private
- Test network connectivity:
curl -I https://github.com
Symptoms: Console shows Git command failures Solutions:
- Verify Git is installed on Jenkins server
- Check branch name matches repository default branch
- Ensure Jenkins user has Git access permissions
- Clear workspace and retry build
Symptoms: Manual builds work, but GitHub pushes don't trigger builds Solutions:
- Verify webhook URL format:
http://jenkins-ip:8080/github-webhook/ - Check Jenkins server accessibility from internet
- Confirm webhook shows green checkmark in GitHub
- Review webhook delivery logs in GitHub settings
- Ensure firewall allows inbound traffic on port 8080
Symptoms: GitHub webhook delivery fails with SSL errors Solutions:
- Use HTTP instead of HTTPS for initial testing
- Configure proper SSL certificates on Jenkins
- Add GitHub IPs to firewall whitelist
- Test webhook delivery manually from GitHub interface
Symptoms: Builds remain in queue without executing Solutions:
- Check Jenkins executors availability
- Verify no jobs blocking the queue
- Restart Jenkins service if needed
- Monitor system resources (CPU, memory, disk)
The following items confirm the successful completion of the project:
- Jenkins dashboard is accessible and functional.
-
my-first-jobis created and visible in the project list. - GitHub repository
jenkins-scmwas created with a README.md. - SCM configuration points to the correct repository URL.
- A manual build was executed successfully.
- The console output showed a successful Git checkout.
- A GitHub webhook was configured with the correct payload URL.
- The webhook delivery showed a successful ping.
- A file modification in GitHub triggered an automatic build.
- The build history shows both manual and automatic builds.
This section summarizes the indicators of a successful implementation.
Manual Build Success Indicators:
- Build status: SUCCESS (blue ball icon)
- Console output: "Finished: SUCCESS"
- Workspace contains repository files
Webhook Automation Success Indicators:
- GitHub webhook shows green checkmark
- File changes trigger immediate builds
- Build history shows sequential build numbers
- No manual intervention required for new builds