DEV Community 👩‍💻👨‍💻


Posted on

GITHUB! Jenkins, pipeline

As a record of how to set up a new CI/CD pipeline from Github to Jenkins:

A good first step is to install Jenkins on a separate machine or VM to get this started.
You can pick Linux, Docker, Kubernetes. What ever is your preference as long as you can get the webserver running.

We will start by assuming you have a github repo and you set up the credentials such as tokens correctly.


Open a new pipeline and choose Github.

Enter your github token to access it initially for the wizard.
If you are associated with multiple accounts or organizations, pick the one of your choosing and then the repo from the list provided.
The fun part starts, you can start adding steps and actions. It even comes with a choice for Git.

One you are done you can run it, but it probably won't work if the repo is private. So we will need to add the login info.
You will find this under Configure of your Pipeline.
Because of Github security you will need your Token once more. It will be protected much like Github Secrets.

We will add the target machine. Go to the main page of Jenkins.
And click on Manage Jenkins.
Give it a new name. Go back to Main Dashboard and Manage Nodes. Click on the new node.

Go under Configure and give it a name.
Add the IP address and credentials for the SSH.

This should do it to pull from github and apply to the target machine.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.