Jenkins is an open-source automation server that can be used to automate parts of the software development process, including building, testing, and deploying applications.

The Jenkins Project

Jenkins CI/CD

Jenkins is often used in conjunction with continuous integration (CI) and continuous delivery (CD) practices.

  • CI is a process of automating the building, testing, and integration of code changes on a regular basis.
  • CD is a process of automating the deployment of code changes to production on a regular basis.

Jenkins can be used to create and manage CI/CD pipelines. A pipeline is a sequence of steps that are executed in order to build, test, and deploy an application. Jenkins pipelines can be defined using a variety of tools, such as the Jenkinsfile or the Jenkins Pipeline Builder.

Jenkins is a popular choice for CI/CD because it is open-source, extensible, and easy to use. It also has a large community of users and contributors who provide support and plugins.

Installing Jenkins with Docker

Pre-Requisites!! Just Get Docker 馃悑馃憞

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

It will be one command, this one, if you are in Linux:

apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version

And install also Docker-compose with:

apt install docker-compose -y

We need to use the following docker-compose:

version: '3'
services:
  jenkins:
    image: jenkins/jenkins:lts
    container_name: jenkins
    ports:
      - 8080:8080
      - 50000:50000
    volumes:
      - ./jenkins_home:/var/jenkins_home
    restart: always

Remember to check the logs for the first time password:

docker logs <containerid>
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword

or directly in the container’s log looking in Portainer.

Then, access Jenkins UI at: localhost:8080


FAQ

F/OSS GIT

F/OSS CI/CD Alternatives

  • Gitlab CI/CD
  • One-Dev
  • woodpecker

Free Automation Tools

Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to manage millions of workflows declaratively in code.

SonarQube

GitHub Actions can be used to trigger SonarQube scans on various events like push or pull requests.

You can add a step in your GitHub Actions workflow to run the SonarQube scanner. This involves setting up the SonarQube server details and running the analysis as part of your GitHub Actions pipeline.

SQ with Jenkins

Jenkins offers a SonarQube plugin that allows for easy integration.

Once the plugin is installed, you can configure a Jenkins job to trigger SonarQube scans. This can include providing the SonarQube server configuration and specifying the project key and token in the job configuration.

SQ with Gitea

While Gitea does not have direct plugin support like Jenkins, you can still integrate SonarQube into your Gitea pipelines using webhook triggers or by manually configuring CI/CD tools (like Drone, which integrates with Gitea) to run SonarQube scans.

Webhooks: Use webhooks in Gitea to trigger external CI/CD tools on events like push or pull requests. CI/CD Tool: In your CI/CD pipeline configuration (like a .drone.yml file for Drone CI), add steps to execute the SonarQube scanner.

Cortex

Open Source Alternative To AWS SageMaker

Production infrastructure for machine learning at scale