Commit 4bef1c3f by Ben Patterson

Merge pull request #2458 from edx/benp/jenkins-master-java

[Jenkins-master] Use Java 7 with custom ARGS.
parents 2cb85b44 1e9f496f
......@@ -7,9 +7,10 @@
sudo: True
gather_facts: True
vars:
COMMON_DATA_DIR: "/mnt"
COMMON_DATA_DIR: "/mnt2"
COMMON_ENABLE_DATADOG: True
COMMON_ENABLE_SPLUNKFORWARDER: True
jenkins_jvm_args: "-Djava.awt.headless=true -Xmx7168m -XX:MaxPermSize=512m"
SPLUNKFORWARDER_LOG_ITEMS:
- source: '/var/lib/jenkins/jobs/*/builds/*/junitResult.xml'
......
......@@ -7,6 +7,8 @@ jenkins_port: 8080
jenkins_version: "1.630"
jenkins_deb_url: "http://pkg.jenkins-ci.org/debian/binary/jenkins_{{ jenkins_version }}_all.deb"
jenkins_deb: "jenkins_{{ jenkins_version }}_all.deb"
# Jenkins jvm args are set when starting the Jenkins service, e.g., "-Xmx1024m"
jenkins_jvm_args: ""
jenkins_plugins:
- { name: "build-name-setter", version: "1.3" }
......
---
dependencies:
- common
- oraclejdk
- role: oraclejdk
tags: java
......@@ -9,8 +9,8 @@
- name: install jenkins extra system packages
apt:
pkg={{','.join(JENKINS_EXTRA_PKGS)}}
state=present update_cache=yes
pkg={{ item }} state=present update_cache=yes
with_items: JENKINS_EXTRA_PKGS
tags:
- jenkins
......@@ -28,7 +28,7 @@
state: directory
owner: "{{ jenkins_user }}"
group: "{{ jenkins_group }}"
- name: download Jenkins package
get_url: url="{{ jenkins_deb_url }}" dest="/tmp/{{ jenkins_deb }}"
......@@ -38,6 +38,18 @@
- name: stop Jenkins
service: name=jenkins state=stopped
- name: set jvm args
lineinfile:
backup: yes
dest: /etc/default/jenkins
regexp: '^JAVA_ARGS='
line: 'JAVA_ARGS=\"{{ jenkins_jvm_args }}\"'
notify:
- restart Jenkins
tags:
- java
- jenkins
# Move /var/lib/jenkins to Jenkins home (on the EBS)
- name: move /var/lib/jenkins
command: mv /var/lib/jenkins {{ jenkins_home }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment