Jenkins Freestyle & Simple declarative project.

Jenkins Freestyle & Simple declarative project.

Within this blog, I have illustrated two projects about freestyle and simple declarative and the concept of GitHub hook trigger.

I am trying to set up circle CI which will take some time as I am running into issues while configuring it. So my next blog will cover that.

Project:    Django-todo-app-delivery

Click Create a Job and select Freestyle project

Select the checkboxes depending on the requirement and the explanation of each is mentioned here. Please zoom in for a better view :)

The project is ready and the below build steps

Now click on the dashboard on the top left. If so build is successful, then click the play button on the right-most side.

On checking the console o/p i.e. build #6

GitHub Hook Trigger

A GitHub webhook trigger is an event or action that prompts GitHub to send a payload to a configured endpoint (URL) whenever the specified event occurs in a repository or organization. This enables you to automate processes or integrate external systems with your GitHub workflow.

To set up a webhook trigger in GitHub, you generally follow these steps:

  1. Navigate to the repository or organization where you want to add the webhook.

  2. Go to the "Settings" tab.

  3. Look for the "Webhooks" or "Hooks" section and click on it.

  4. Click on the "Add webhook" or "Create webhook" button.

  5. Provide the required information, such as the Payload URL (the endpoint that will receive the webhook payload), the content type, and the events that should trigger the webhook.

  6. Optionally, you can configure other settings, such as adding a secret for secure communication or selecting which SSL certificate to use.

  7. Save or create the webhook.

Once the webhook trigger is set up, GitHub will send a POST request to the specified payload URL whenever the configured event occurs. The payload typically contains information about the event, such as the type of event, the repository, and relevant data.

Now I can see the green tick on the right side, which is a clear indicator that my webhook is configured successfully.

Declarative pipe:
The Jenkins Declarative Pipeline is a domain-specific language (DSL) extension for Jenkins that allows you to define your build pipeline using a more structured and readable syntax. It provides a simplified way to create continuous delivery pipelines by using a declarative approach.

The advantage of a Declarative pipe is that it will show deployment as failed even if 1 of the stages fails.

Click create new and select the pipeline

Hit save and build now and click to see the details