Commit 01e6def7 by Will Daly

Use upstart script to create Jenkins workspace on /mnt

parent 01503e09
......@@ -9,19 +9,24 @@
shell: touch {{ jenkins_user_home }}/.bashrc
sudo_user: "{{ jenkins_user }}"
- name: jenkins | Create directory for builds
file: path={{ jenkins_workspace }}
owner={{ jenkins_user }} group={{ jenkins_group }}
state=directory
- name: jenkins | Create .ssh directory
file: path={{ jenkins_user_home }}/.ssh state=directory
owner={{ jenkins_user }} group={{ jenkins_group }}
# We need the upstart script to create the build directory
# so that (a) it will be run when a new instance is created
# on the current EBS, and (b) it will be run as root.
- name: jenkins | Install upstart script to create build dir
template: src=jenkins_workspace.conf.j2
dest=/etc/init/jenkins_workspace.conf
owner=root group=root
# Because of a bug in the latest release of the EC2 plugin
# we need to use a key generated by Amazon (not imported)
# To satisfy this, we allow users to log in as Jenkins
# using the same keypair the instance was started with.
- name: jenkins | Create .ssh directory
file: path={{ jenkins_user_home }}/.ssh state=directory
owner={{ jenkins_user }} group={{ jenkins_group }}
- name: jenkins | Copy ssh keys for jenkins
command: cp /home/ubuntu/.ssh/authorized_keys /home/{{ jenkins_user }}/.ssh/authorized_keys
......@@ -49,6 +54,7 @@
- unzip
- xml-twig-tools
# Configure Mongo to use /mnt so we don't
# run out of disk space
- name: jenkins | Stop mongo service
......
# Create directory for Jenkins jobs
start on runlevel [2345]
task
script
mkdir -p {{ jenkins_workspace }}
chown {{ jenkins_user }}:{{ jenkins_group }} {{ jenkins_workspace }}
chmod 700 {{ jenkins_workspace }}
end script
---
jenkins_workspace: /opt/jenkins
jenkins_workspace: /mnt/jenkins
jenkins_phantomjs_url: https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
jenkins_phantomjs_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2
jenkins_phantomjs_folder: phantomjs-1.9.1-linux-x86_64
......
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