juju4.jenkins

No Maintenance Intended

DEPRECATED/LOOKING FOR MAINTAINERS -> archived

Build Status - Master Build Status - Devel

Jenkins ansible role

Ansible role to setup jenkins with java. Test environment tools are addressed in jenkinsenv role. You can use jenkinsslave role to setup extra nodes.

Requirements & Dependencies

Ansible

It was tested on the following versions:

  • 2.0
  • 2.2
  • 2.5

Operating systems

Tested on Ubuntu 14.04, 16.04 and Centos7. Support of 18.04 is pending Java10 support (See below)

Example Playbook

Just include this role in your list. For example

- host: all
  roles:
    - juju4.jenkins

Variables

## possible gitlab is taking 8080
jenkins_http_port: 8888

jenkins_plugins:
    - antisamy-markup-formatter
    - build-timeout 
    - credentials-binding

jenkins_java_options: "-Djenkins.install.runSetupWizard=false -Dmail.smtp.starttls.enable=true"

jenkins_git_email: [email protected]
jenkins_git_user: myuser

#jenkins_smtphost: 127.0.0.1
#jenkins_smtp_defaultdomain: example.com

Continuous integration

This role has a travis basic test (for github), more advanced with kitchen and also a Vagrantfile (test/vagrant). Default kitchen config (.kitchen.yml) is lxd-based, while (.kitchen.vagrant.yml) is vagrant/virtualbox based.

Once you ensured all necessary roles are present, You can test with:

$ gem install kitchen-ansible kitchen-lxd_cli kitchen-sync kitchen-vagrant
$ cd /path/to/roles/juju4.jenkins
$ kitchen verify
$ kitchen login
$ KITCHEN_YAML=".kitchen.vagrant.yml" kitchen verify

or

$ cd /path/to/roles/juju4.jenkins/test/vagrant
$ vagrant up
$ vagrant ssh

FAQ

Troubleshooting & Known issues

java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A

= https://issues.jenkins-ci.org/browse/JENKINS-23232 possible fix TCP port for JNLP agents (fixed value, not random, not disabled)

  • No X-Jenkins-CLI2-Port
java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, null, Date, X-Hudson-Theme, X-Hudson, Content-Length, Expires, X-Jenkins-Session, Set-Cookie, Content-Type, Server, X-Content-Type-Options, Cache-Control]

https://github.com/geerlingguy/ansible-role-jenkins/issues/47 check also which url path is correct / or /jenkins

  • Jenkins Github hook jenkins.log:
org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@1d0a07a6{r=1,c=false,a=IDLE,uri=}

https://stackoverflow.com/questions/29527803/eliminating-or-understanding-jetty-9s-illegalstateexception-too-much-data-aft

License

BSD 2-clause

About

setup jenkins with java

Install
ansible-galaxy install juju4.jenkins
GitHub repository
License
bsd-2-clause
Downloads
103
Owner