---
title: How to setup Jenkins?
description: "BQ Platform provides a feature of running tests from the CI/CD tools. Jenkins is one such tool. ### Instructions to Setup Jenkins using Docker Docker is a nifty tool to run and try pre-configured software images. We will use Docker…"
url: "https://bqurious.com/docs/how-to-setup-jenkins/"
updated: "2021-01-29"
category: How to Guides
---

# How to setup Jenkins?

BQ Platform provides a feature of running tests from the CI/CD tools. Jenkins is one such tool.

### Instructions to Setup Jenkins using Docker

Docker is a nifty tool to run and try pre-configured software images. We will use Docker to guide you through the process. Process to setup Jenkins on non-docker environment remains the same after installation.

1. Download and install Docker.
2. Pull Jenkins from the public repo by run following command
                    *docker pull Jenkins/Jenkins*
3. Start Jenkins using following command
                     *docker run -p 8080:8080 –name=my_jenkins Jenkins/Jenkins*
4. Once it is started, open [*http://localhost:8080*](http://localhost:8080/) in browser.
   You will see the following screen. It will prompt for password.

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/4.png?w=1200&ssl=1)
5. You can find the password from terminal (at the time of server start)

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/5.png?w=1200&ssl=1)
6. Create an admin user for accessing the Jenkins account.

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/6.png?w=1200&ssl=1)
7. Install all suggested plugins or select the required plugins

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/7.png?w=1200&ssl=1)

   It will take a some time to finish the installation.

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/8.png?w=1200&ssl=1)
8. Once the plugin installation is done, it will open the Jenkins dashboard

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/9-1.png?w=1200&ssl=1)
9. Click on *Manage Jenkins* and then *Manage Plugins*

   ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/10.png?w=1200&ssl=1)
10. Check for **HTTP Request** under the *Installed tab*.
    If it is not installed, click on *Available Tab* and search for **HTTP Request** and click on install button.
    This plugin enables you to make HTTP calls from Jenkins tasks. After installing the plugin, restart the Jenkins server

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/11.png?w=1200&ssl=1)
11. Then go to Jenkins Dashboard and click on *Create a job*.
    Then enter some name in item name field and then click on Freestyle project

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/12.png?w=1200&ssl=1)
12. For Scheduling the job, you need to check the Build periodically in Build Triggers group

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/12.1.png?w=1200&ssl=1)
    1. By setting the schedule period to 15 13 \* \* \* you tell Jenkins to schedule the build every day of every month of every year at the 15th minute of the 13th hour of the day.
       Jenkins used a cron expression, and the different fields are:
       1. MINUTES Minutes in one hour (0-59)
       2. HOURS Hours in one day (0-23)
       3. DAYMONTH Day in a month (1-31)
       4. MONTH Month in a year (1-12)
       5. DAYWEEK Day of the week (0-7) where 0 and 7 are Sunday
13. Please ensure a Plan is created and saved in BQ. See [Integrating with CICD pipeline](https://bqurious.com/docs/integrating-with-ci-cd-pipeline/) for details.
14. Click on Build tab and enter Bqurious ci/cd url i.e. [https://app.bqurious.com/api2/ci/executeFromCi](https://app.bqurious.com/api2/ci/executeFromCi)
15. Select POST in HTTP mode

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/14.png?w=1200&ssl=1)
16. Click on Advanced.. button. Then, change the Accept and Content-Type to APPLICTION_JSON

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/15.png?w=1200&ssl=1)
17. Copy the run token of saved plan form bqurious and use it in Request body as {“runToken”: “COPIED TOKEN“} and save the job.

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/16.png?w=1200&ssl=1)
18. Go to dashboard and click the created job from list. Here it is *Regression Test With Bq*

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/17.png?w=1200&ssl=1)
19. Click on *Build Now* from left side menu.

    ![](https://i0.wp.com/bqurious.com/wp-content/uploads/2021/01/18.png?w=1200&ssl=1)

This will initiate the execution of selected Plan on BQ.

### Related articles

[Integrating with CICD pipeline](https://bqurious.com/docs/integrating-with-ci-cd-pipeline/)
[Running Tests from CICD pipeline](https://bqurious.com/docs/running-tests-from-ci-cd-pipeline/)

### *Related*
