# Jenkins (Freestyle)

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FP27bvKHxXhATQyaeBUd4%2Fjenkins-svg.svg?alt=media&#x26;token=f43161a3-c331-476d-b89d-5b6cf6222958" alt=""><figcaption></figcaption></figure>

Jenkins is the leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.

You can use our [jenkins](https://plugins.jenkins.io/tacotruck-plugin) plugin in your free-style project. You can setup jenkins from their official [docs](https://www.jenkins.io/doc/book/installing/) or follow our [jenkins-pipeline](https://docs.testfiesta.com/automation/ci-cd-integration/jenkins-pipeline "mention") guide.

### Install Tacotruck plugin

Go to the "Available Plugins" section on the settings page and search for "Tacotruck" to install.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FW13MIfPJXqjn7Tw6x90f%2Fimage.png?alt=media&#x26;token=ec484b3b-56b8-45a2-94bd-9dc204222fc0" alt=""><figcaption></figcaption></figure>

### Install Node.js Plugin

Tacotruck plugin requires `nodejs` as dependency. Login to your jenkins dasboard and go to the settings page. Plugins are available at <http://localhost:8080/manage/pluginManager/available> this path. You can search for "Nodejs" plugin. Select the plugin and install. You may need to restart your jenkins instance after installing the nodejs plugin.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2Fpw0yZrW1ihqRb52VOSeH%2Fjenkins-available-plugin.webp?alt=media&#x26;token=a9a1f17d-89d3-4d28-a74e-033961e2060e" alt=""><figcaption></figcaption></figure>

### Configure Nodejs as Global Tool

1. Go to settings and click on tools section.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2Fb1Eiz0xv91Se719h5wx8%2Fjenkins-settings-page.png?alt=media&#x26;token=4c699ec0-eae8-4ee6-8459-a53e36879d9a" alt=""><figcaption></figcaption></figure>

2. Click on "Add Nodejs" button

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FqB2APEXfyS4EwRm1TcPK%2Fconfigure-nodejs-tool.webp?alt=media&#x26;token=0d6097ea-156e-4656-a59a-1c86b2fc1357" alt=""><figcaption></figcaption></figure>

3. Install a Nodejs version. Please make sure that you install node **version** ≥ <mark style="color:red;">`20`</mark>. You need to name the Tool so that we can refer it later from the pipeline script.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FHqXRk1A6Wcpu6qJLwSqA%2Fconfigure-nodejs-tools-section.webp?alt=media&#x26;token=f50fef15-11bb-4aef-b790-4b8f78e9c2a8" alt=""><figcaption></figcaption></figure>

### Create a Freestyle project

Click on the "New Item" button from the home page of jenkins dashboard and create a new freestyle project.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FPu42lGXKQ71jbX4jxt8T%2Fjenkins-create-freestyle.webp?alt=media&#x26;token=c2d8b699-1eab-4464-8623-2ce24656d23f" alt=""><figcaption></figcaption></figure>

### Configure your project

First we need to configure `nodejs` environment for Tacotruck CLI. We can select the "Environment" tab and under "Envronment" section we should select the option to `Provide Node & npm bin/ folder to PATH`&#x20;

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FmPGdlzut7Uc1wiZhWo7F%2Fjenkins-configure-nodejs-env-for-project.png?alt=media&#x26;token=4a3a3fd1-54c2-4e1c-aaba-bf9514b12631" alt=""><figcaption></figcaption></figure>

### Add Build and Test step

You can configure build and test step based on your tech stack or requirements. Here is an example that runs a C# .NET test and outputs a `test-results.xml`  file.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FDm3jjO6yQg193MRxzKoF%2Fjenkins-freestyle-add-build-step.png?alt=media&#x26;token=9a397e9b-97dd-4d7d-a961-59cb70b2e896" alt=""><figcaption></figcaption></figure>

### Submit the test results using Tacotruck step

We can add "Execute Tacotruck" build step from "Add build step" dropdown button and configure all the required fields.

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FkmSogQlrEEXMdDKiXpeJ%2Fjenkins-tacotruck-plugin-execute-option.png?alt=media&#x26;token=51cbe7c0-58f6-42c9-8a91-2ec16d673c3e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2FXYnLbFXpZI2A64uEbFxu%2Fjenkins-freestyle-configure-tacotruck-step.png?alt=media&#x26;token=75b98e0d-e0aa-4d48-b0a7-71a7ff7ce8b2" alt=""><figcaption></figcaption></figure>

### Support and Resources

* [TacoTruck Examples](https://github.com/testfiesta/tacotruck-examples)
* [Jenkins Plugin](https://plugins.jenkins.io/tacotruck)
* [Jenkins Plugin Source](https://github.com/jenkinsci/tacotruck-plugin)
* [Tacotruck Issues](https://github.com/testfiesta/tacotruck/issues)
* [**CLI Reference**](https://docs.testfiesta.com/automation/tacotruck-cli)
