| 
 | 
 | 
###### [Home](home) / [Jenkins](jenkins) / Create Job
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
---
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
# Create a Jenkins Job
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
Creating a Jenkins job for your Gitlab project can be broken into 3 major steps:
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 * Configure New Jenkins Job
 | 
 | 
 | 
 | 
 * Configure Gitlab Project
 | 
 | 
 | 
 | 
 * Add Status Badge to Project
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
#### For the workflow below, we will reference the [KD / kd-ui](https://vc.digitec.local/kd/kd-ui) project as an example
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
### Configure New Jenkins Job
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 1. Go to http://ci.digitec.local
 | 
 | 
 | 
 | 
 2. Click [New Job](http://ci.digitec.local/view/All/newJob) in the left sidebar
 | 
 | 
 | 
 | 
 3. Put your (Gitlab) project name as the job name - e.g. `kd-ui`
 | 
 | 
 | 
 | 
 4. Choose **Build a free-style software project**
 | 
 | 
 | 
 | 
 5. Click **OK** button
 | 
 | 
 | 
 | 
 6. Configure **Source Code Management**
 | 
 | 
 | 
 | 
     1. Select **Git**
 | 
 | 
 | 
 | 
     2. Enter your repository URL - e.g. `git@vc.digitec.local:kd/kd-ui.git`
 | 
 | 
 | 
 | 
     3. **Credentials**: `jenkins`
 | 
 | 
 | 
 | 
     4. **Repository browser**: `gitlab`
 | 
 | 
 | 
 | 
     5. Then enter your Gitlab URL - e.g. `https://vc.digitec.local/kd/kd-ui/`
 | 
 | 
 | 
 | 
     6. Grab the Gitlab version from [Gitlab Admin Area](https://vc.digitec.local/admin) and enter it in the **Version** text input - e.g. `6.4.3`
 | 
 | 
 | 
 | 
 7. Under **Build Triggers**, enable **Poll SCM**
 | 
 | 
 | 
 | 
 8. Configure the **Build** section. This varies per project. The following is the build for the `kd-ui` project
 | 
 | 
 | 
 | 
     1. From **Add Build Step** dropdown, chhose **Execute Shell**
 | 
 | 
 | 
 | 
     2. **Commands**:
 | 
 | 
 | 
 | 
         * `npm install`
 | 
 | 
 | 
 | 
         * `grunt jenkins`
 | 
 | 
 | 
 | 
 9. Under **Post-build Actions**, choose **E-mail Notification** from the dropdown
 | 
 | 
 | 
 | 
     * Enable both checkboxes, and make any other modifications you see fit
 | 
 | 
 | 
 | 
10. Click **Save** button
 | 
 | 
 | 
 | 
11. Click **Build Now** from the sidebar on the left to confirm that your build runs successfully
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
### Configure Gitlab Project
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 1. Go to the Settings section of your Gitlab project - e.g. `https://vc.digitec.local/kd/kd-ui-docs/edit`
 | 
 | 
 | 
 | 
 2. Choose the **Web Hooks** link from the left sidebar
 | 
 | 
 | 
 | 
 3. Enter `http://ci.digitec.local/git/notifyCommit?url={GIT PROJECT SSH URL}`, where `{GIT PROJECT SSH URL}` is the SSH URL for your Gitlab project - e.g. `git@vc.digitec.local:kd/kd-ui.git`
 | 
 | 
 | 
 | 
 4. Enable the **Push events** trigger, and click **Add Web Hook**
 | 
 | 
 | 
 | 
 5. The **Test Hook** functionality doesn't appear to be working at the time of this writing, push a change to your Gitlab repository and then check your Jenkins job to verify that it was triggered.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
### Add Status Badge to Project
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
Use the [Jenkins Status Badge Example](https://vc.digitec.local/digitec/digitec-wiki/snippets/12) snippet to add a Jenkins status badge to your project's `README.md` file. |