Salt states used to run jenkins tests
SaltStack ApacheConf Python Other
Switch branches/tags
Nothing to show
Latest commit 521613d May 25, 2017 @cachedout cachedout committed on GitHub Merge pull request #359 from rallytime/merge-master
[master] Merge forward from nitrogen to master
Permalink
Failed to load latest commit information.
_grains Make external_ip custom grain py3-compatible May 16, 2017
_modules Use pip2.7 explicitly on CentOS 6 May 3, 2017
_states Pass name as a string instead of a list May 19, 2017
accounts accountes.test_account: add MacOS ssh service name Mar 18, 2016
apache use osrelease instead of osmajorrelease Sep 15, 2016
buildpackage Add CentOS 5 automated builds Sep 16, 2014
cloud-only Aggregate package installations Mar 10, 2017
git Merge branch 'nitrogen' into 'master' May 23, 2017
glance Nitrogen and later uses a numeric osmajorrelease May 16, 2017
halite s/pip/pip-install/g Apr 30, 2015
keystone Nitrogen and later uses a numeric osmajorrelease May 16, 2017
nova Nitrogen and later uses a numeric osmajorrelease May 16, 2017
openstack add nova service Sep 20, 2016
python Merge branch 'nitrogen' into 'master' May 25, 2017
selinux Aggregate package installations Mar 10, 2017
supervisor Aggregate package installations Mar 10, 2017
tasks Copy the old minion cache directory Apr 14, 2014
.gitignore Fix jinja rendering error Jan 28, 2017
README.rst Add a note about updating the file_roots dir in minion config file Mar 29, 2017
Saltfile Add `minion` and `Saltfile` to allow running salt-call directly on th… Mar 12, 2017
_python.sls Nitrogen and later uses a numeric osmajorrelease May 16, 2017
bower.sls Aggregate package installations Mar 10, 2017
ca-certificates-mozilla.sls changed pkg.installed to pkg.latest in ca-certificates-mozilla.sls Aug 17, 2015
centos_pycrypto.sls Nitrogen and later uses a numeric osmajorrelease May 16, 2017
curl.sls Merge branch 'nitrogen' into 'master' May 23, 2017
dmidecode.sls Installing dmidecode is not dependant on python version Mar 23, 2017
dnsutils.sls Aggregate package installations Mar 10, 2017
docker.sls Add back docker-py for all platforms Mar 20, 2017
extra-swap.sls Changes to support OpenSuse 42.2 May 24, 2017
gcc.sls Aggregate package installations Mar 10, 2017
gem.sls Aggregate package installations Mar 10, 2017
gpg.sls Aggregate package installations Mar 10, 2017
libsodium.sls Aggregate package installations Mar 10, 2017
locale.sls Merge branch '2016.11' into 'nitrogen' May 25, 2017
lxc.sls changed mypkgs back to lxc: May 6, 2015
minion Add `minion` and `Saltfile` to allow running salt-call directly on th… Mar 12, 2017
nginx.sls Install nginx for git_pillar HTTP tests May 11, 2017
npm.sls Merge branch '2016.3' into '2016.11' May 25, 2017
openssl-dev.sls Aggregate package installations Mar 10, 2017
openssl.sls Aggregate package installations Mar 10, 2017
patch.sls Aggregate package installations Mar 10, 2017
pyopenssl.sls Aggregate package installations Mar 10, 2017
python-zypp.sls Correct the package name to install Jul 19, 2014
python26.sls Aggregate package installations Mar 10, 2017
python27.sls changed pkg.installed to pkg.latest Mar 7, 2016
python3.sls Nitrogen and later uses a numeric osmajorrelease May 16, 2017
rabbitmq.sls update six for keystoneclient Sep 20, 2016
redhat-rpm-config.sls Aggregate package installations Mar 10, 2017
rpmforge.repo added pyvmomi. added update_git.sls to fix the problems with cent6 Aug 20, 2015
sed.sls Aggregate package installations Mar 10, 2017
subversion.sls Aggregate package installations Mar 10, 2017
swig.sls Aggregate package installations Mar 10, 2017
testrun-bootstrap-no-deps.sls Fix typo Dec 14, 2014
testrun-no-deps.sls Removing --sysinfo because it is causing 2015.8 and develop test runs… Sep 2, 2015
testrun.sls Fix typo Dec 14, 2014
testrunc.sls Nitrogen and later uses a numeric osmajorrelease May 16, 2017
update.sls Forgot to add the statefile... May 6, 2015
update_dnf.sls Remove aggressive checking for Fedora version Apr 26, 2017
update_git.sls small changes Aug 21, 2015
versionlock.sls Remove aggressive checking for Fedora version Apr 26, 2017

README.rst

Salt Jenkins State Tree

Salt states used to run Jenkins tests.

The salt-jenkins state tree is used to configure and prepare the testing VMs used to run Salt's test suite on Salt's Jenkins system. These states install the testing requirements needed to execute the tests themselves, any packages and dependencies needed for particular module or state tests to run, set up configuration files, and clone Salt into the /testing directory.

Occasionally, new packages need to be installed on the testing VMs to ensure that particular tests will run. For example, if a contributor adds a test file for Salt's docker execution module, the docker package needs to be installed on the test VMs. This repository is the place to perform that package installation by adding a state.

Locally Running States

You can clone this repository, and, as long as you already have salt installed, you can run this state tree directly (instead of using gitfs).

For example:

salt-call state.sls git.salt pillar="{py3: true, test_transport: zeromq, with_coverage: true}"

The minion configuration file also needs to be edited to direct the file_roots to the salt-jenkins cloned directory. For example, if the salt-jenkins repository was cloned directly into the /root dirctory, the minion config file would look like this:

# /etc/salt/minion

file_roots:
  base:
    - /root/salt-jenkins

This is possible due to the fact that included in this state tree repository there are Saltfile and minion configuration files which set everything up in order to run salt-call locally against this state tree.

Contributing

The salt-jenkins project is welcome and open to contributions.

The salt-jenkins repository has a few openly maintained branches. These correspond to the actively maintained release branches in the Salt project. This helps stabilize the testing environments that the salt-jenkins states configure on the test VMs running at jenkins.saltstack.com.

There is a node located in Salt's Jenkins installation configured to run the tests for each supported Salt release branch. In turn, each node is configured to run the salt-jenkins state tree based on the Salt release branch it supports.

For example, the Jenkins node labeled 2016_3 runs tests against the HEAD of the 2016.3 branch of Salt. This same 2016_3 node is configured to run the salt-jenkins state tree using the 2016.3 branch of the salt-jenkins repository.

Note: The "master" branch of the "salt-jenkins" repository is used to test the "develop" branch of Salt.

Which Salt Jenkins Branch?

GitHub will open pull requests against Salt Jenkins's main branch, master, by default. Contributions to the Salt Jenkins state tree should be added to the oldest supported branch that requires the change.

For example, imagine a new execution module was added to the develop branch in Salt, along with tests for the new module. The new module requires a dependency that is not currently installed by the Salt Jenkins states. The new state(s) would need to be added to the master branch of Salt Jenkins.

If new tests are written against an older release branch in Salt, such as the 2016.11 branch, then the change for the Salt Jenkins states needs to also be submitted against the 2016.11 branch in the salt-jenkins repository.

Merge Forward Policy

The Salt Jenkins repository follows a "Merge Forward" policy. The merge-forward behavior means that changes that are submitted to older "release" branches will automatically be merged forward into the newer branches. (The Salt repository follows this same behavior.) This makes is easy for contributors to make only one pull-request against an older branch, but allow the change to propagate to all salt-jenkins branches as the tests make their way forward in the Salt repository.

Here's a simple example of changes merging forward from older branches to newer branches, where the HEAD of each branch is merged into the directly newer branch:

master    *---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*------------>
                                                             /
                                                            / (Merge Forward from 2016.11 to master)
                                                           /
2016.11   *---*---*---*---*---*---*---*---*---*---*---*---*
                                     /
                                    / (Merge Forward from 2016.3 to 2016.11)
                                   /
2016.3    *---*---*---*---*---*---*