====== Jenkins ======
Meet [[https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins|Jenkins]]
====== Install and setup ======
====== Add a project ======
====== Continuous testing with Jenkins ======
====== Continuous Delivery with Jenkins ======
===== Local JBoss =====
Deploying an application to JBOSS 7 straight from jenkins works as follows:
* create a management user making use of the add-user.sh script to be found in the JBOSS bin directory.
* alter pom.xml to include the credentials of this management user like:
org.jboss.as.plugins
jboss-as-maven-plugin
7.1.1.Final
user
pass
* change the job configuration such that "Poll SCM" is activated
* add goal jboss-as:deploy to the goals
==== Remote JBoss ====
==== Optimize Python Builds =====
Python Builds should be started from clean environment.
Problem: Building large packages is slow and error-prone (numpy...)
That's why we pre-package:
On python builds:
.pip/pip.conf
[global]
download-cache = /homedir/.pip/cache
find-links = /homedir/.pip/packages
[install]
use-wheel = yes
[wheel]
wheel-dir = /homedir/.pip/packages
Create dirs.
Execute:
pip install wheel
pip wheel numpy
pip wheel scipy (install dependencies first)
etc.
Packages will be created an cached.
==== Python projects ====
- Head Builder:
* Discard old builds
* Git Repo: SSH-URL with Credentials
* Branches to build: */master
* Clean after checkout
* Poll SCM: z.B. H/5 * * * *
* Abort build if stuck: 60
* Virtualenv: CPython-2.7 / Nature: Shell
pip install wheel
pip install flake8 flake8-docstrings nose coverage mccabe numpy mock pint pandas scipy
python ./setup.py build
python ./setup.py nosetests --with-coverage --with-xunit
python -m coverage xml --include=*
flake8 --max-complexity=10 --format=pylint | tee pylint.out
* Report violations: pylint: %%**%%/pylint.out
* Publish Junit test result report: nosetests.xml amplification factor: 1
* Publish Cobertura Coverage Report: coverage.xml
- MergeRequest Builder:
* Discard old builds
* This build is parameterized:
* Text-fields: gitlabSourceBranch, gitlabTargetBranch, gitlabSourceRepoURL, gitlabSourceRepoName,
* Git Repo:
* 1 Repo: SSH-URL with Credentials, Name origin
* 2 Repo: ${gitlabSourceRepoURL}, Credentials, Name ${gitlabSourceRepoName}
* Branches to build: */${gitlabSourceBranch}
* Merge before build: Name origin, Branch: ${gitlabTargetBranch}
* Clean after checkout
* Build when a change is pushed to Gitlab (don't forget to add Link in gitlab)
* Build on Merge Request Events
* Abort build if stuck: 60
* Virtualenv: CPython-2.7 / Nature: Shell
pip install wheel
pip install flake8 flake8-docstrings nose coverage mccabe numpy mock pint pandas scipy
python ./setup.py build
python ./setup.py nosetests --with-coverage --with-xunit
python -m coverage xml --include=*
flake8 --max-complexity=10 --format=pylint | tee pylint.out
* Report violations: pylint: %%**%%/pylint.out
* Publish Junit test result report: nosetests.xml amplification factor: 1
* Publish Cobertura Coverage Report: coverage.xml