<commit_before><!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Jenkins build framework for iX projects](#jenkins-build-framework-for-ix-projects)
- [Requirements](#requirements)
- [Getting Started](#getting-started)
- [Manually running test framework](#manually-running-test-framework)
- [FreeNAS Testing Framework](#freenas-testing-framework)
  - [Adding New tests](#adding-new-tests)
  - [Where are tests run?](#where-are-tests-run)
- [Use Jenkins FreeNAS or TrueNAS update servers (iX Internal only)](#use-jenkins-freenas-or-truenas-update-servers-ix-internal-only)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Jenkins build framework for iX projects
===========

The scripts in this repo will allow you to build PC-BSD or FreeNAS, either
as an automated job from Jenkins or manually. It includes support to build
the following:

 * FreeNAS 9.10 / 10.0
 * PC-BSD 10.2 / 10.3 / 11.0-CURRENT


Requirements
============

A system running PC-BSD/FreeBSD 11.0-CURRENT, with at minimum 16GB of memory.
(Building PC-BSD packages in a reasonable time works best with 48GB or more)

Recommended:
* CPU: 8 Cores or more
* Memory: 16GB (For FreeNAS) 48GB (For PC-BSD)
* Disk: 20GB (For FreeNAS) 200GB (For PC-BSD)

[PC-BSD Download Site](http://download.pcbsd.org/iso/)


Getting Started
============

To prep a new system for building, first download the repo and install with
the following:

```
% git clone --depth=1 https://github.com/iXsystems/ixbuild.git
% cd ixbuild
% sudo make jenkins
```

During the installation you will be asked if you want to make this a "node" or "master",
the "master" setup will install and configure Jenkins. If you already have Jenkins
installed, using the "node" setup will prep the system to act as new builder for
your existing Jenkins service.

Once a new "master" is deployed, you can access your Jenkins interface from:

[http://localhost:8180/jenkins/](http://localhost:8180/jenkins/)


Manually running test framework
=======

To prep a new system for running tests manually, first create a freenas.cfg 
before executing checkprogs:

```
 # cp freenas/freenas.cfg.dist freenas/freenas.cfg
 # cd freenas/scripts && ./checkprogs.sh
```

Tests are located in the freenas/scripts directory.  These scripts can also be run 
directly by pointing them at a FreeNAS instance with the following syntax:

FreeNAS 9.10

```
 # cd freenas/scripts && ./9.10-create-tests.sh
 # cd freenas/scripts && ./9.10-update-tests.sh
 # cd freenas/scripts && ./9.10-delete-tests.sh
````

FreeNAS 10.0

````
 # cd freenas/scripts && ./10-create-tests.sh
 # cd freenas/scripts && ./10-update-tests.sh
 # cd freenas/scripts && ./10-delete-tests.sh
```

```
 *Optional* arguments to 9.10-tests.sh<commit_msg>Test arguments are not version specific and can be used with any test<commit_after><!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Jenkins build framework for iX projects](#jenkins-build-framework-for-ix-projects)
- [Requirements](#requirements)
- [Getting Started](#getting-started)
- [Manually running test framework](#manually-running-test-framework)
- [FreeNAS Testing Framework](#freenas-testing-framework)
  - [Adding New tests](#adding-new-tests)
  - [Where are tests run?](#where-are-tests-run)
- [Use Jenkins FreeNAS or TrueNAS update servers (iX Internal only)](#use-jenkins-freenas-or-truenas-update-servers-ix-internal-only)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Jenkins build framework for iX projects
===========

The scripts in this repo will allow you to build PC-BSD or FreeNAS, either
as an automated job from Jenkins or manually. It includes support to build
the following:

 * FreeNAS 9.10 / 10.0
 * PC-BSD 10.2 / 10.3 / 11.0-CURRENT


Requirements
============

A system running PC-BSD/FreeBSD 11.0-CURRENT, with at minimum 16GB of memory.
(Building PC-BSD packages in a reasonable time works best with 48GB or more)

Recommended:
* CPU: 8 Cores or more
* Memory: 16GB (For FreeNAS) 48GB (For PC-BSD)
* Disk: 20GB (For FreeNAS) 200GB (For PC-BSD)

[PC-BSD Download Site](http://download.pcbsd.org/iso/)


Getting Started
============

To prep a new system for building, first download the repo and install with
the following:

```
% git clone --depth=1 https://github.com/iXsystems/ixbuild.git
% cd ixbuild
% sudo make jenkins
```

During the installation you will be asked if you want to make this a "node" or "master",
the "master" setup will install and configure Jenkins. If you already have Jenkins
installed, using the "node" setup will prep the system to act as new builder for
your existing Jenkins service.

Once a new "master" is deployed, you can access your Jenkins interface from:

[http://localhost:8180/jenkins/](http://localhost:8180/jenkins/)


Manually running test framework
=======

To prep a new system for running tests manually, first create a freenas.cfg 
before executing checkprogs:

```
 # cp freenas/freenas.cfg.dist freenas/freenas.cfg
 # cd freenas/scripts && ./checkprogs.sh
```

Tests are located in the freenas/scripts directory.  These scripts can also be run 
directly by pointing them at a FreeNAS instance with the following syntax:

FreeNAS 9.10

```
 # cd freenas/scripts && ./9.10-create-tests.sh
 # cd freenas/scripts && ./9.10-update-tests.sh
 # cd freenas/scripts && ./9.10-delete-tests.sh
````

FreeNAS 10.0

````
 # cd freenas/scripts && ./10-create-tests.sh
 # cd freenas/scripts && ./10-update-tests.sh
 # cd freenas/scripts && ./10-delete-tests.sh
```

```
 *Optional* arguments for test scripts
{'fraction_non_alphanumeric': 0.1254631188952509, 'fraction_numerical': 0.021387672617042774, 'mean_word_length': 4.080410607356715, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3238082', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1809, 'n_words': 672}