Commit 01ffb3ee by Jay Zoldak

Run some tasks as jenkins user so that the permissions are correct. Also some…

Run some tasks as jenkins user so that the permissions are correct. Also some refactoring of the jenkins tasks.
parent 4b8e3f9e
......@@ -5,3 +5,6 @@ Vik Paruchuri <vik@edx.org>
Jason Bau <jbau@stanford.edu>
Ed Zarecor <ed@edx.org>
John Kern <kern3020@gmail.com>
Will Daly <will@edx.org>
Bethany LaPenta <lapentab@mit.edu>
Jay Zoldak <zoldak@edx.org>
......@@ -57,4 +57,5 @@
shell: mv chromedriver /usr/local/bin/chromedriver
- name: Install Chromedriver 4
shell: chmod go+rx /usr/local/bin/chromedriver
\ No newline at end of file
shell: chmod go+rx /usr/local/bin/chromedriver
---
- name: Make backup directory
sudo_user: jenkins
shell: mkdir {{ jenkins_home }}/backup
- name: Git clone
sudo_user: jenkins
action: git repo=https://github.com/lapentab/jenkinsconfig.git dest={{jenkins_home}}/backup
---
- name: Add the jenkins user to the edx group
user: name=jenkins append=yes groups="edx"
- name: Install Jenkins
shell: wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
......@@ -12,12 +15,11 @@
apt: pkg=jenkins state=present
- name: Make plugins directory
sudo_user: jenkins
shell: mkdir -p {{ jenkins_home }}/plugins
- name: Mod plugins directory permissions
shell: chmod -R 777 {{ jenkins_home }}/plugins
- name: Install Jenkins plugins
sudo_user: jenkins
get_url: url=http://updates.jenkins-ci.org/latest/${item}
dest={{ jenkins_home }}/plugins/${item}
with_items:
......@@ -64,39 +66,3 @@
- violations.hpi
notify:
- restart Jenkins
- name: Mod plugins directory permissions (Again)
shell: chmod -R 777 {{ jenkins_home }}/plugins
- name: Restart Jenkins to allow for new plugins
shell: service jenkins restart
- name: Make backup directory
shell: mkdir {{ jenkins_home }}/backup
- name: Make backup directory
shell: chmod -R 777 {{ jenkins_home }}/backup
- name: Chmod mnt
shell: chmod -R 777 /mnt/
- name: Chmod /usr/local
shell: chmod -R 777 /usr/local/
- name: chmod tmp
shell: chmod -R 777 /tmp/
- name: Symbolic link site packages
shell: ln -s /usr/local/lib/python2.7/site-packages/ /usr/local/lib/python2.7/dist-packages/
- name: install numpy
shell: pip install numpy==1.6.2
- name: install scipy
shell: pip install scipy==0.11.0
# - name: cmod lib directory for restore **Undo this after restore**
# shell: chmod -R 777 /var/lib
# - name: Git clone
# action: git repo=https://github.com/lapentab/jenkinsconfig.git dest={{jenkins_home}}/backup
---
- include: jenkins.yml
- include: config-backup.yml
- include: xvfb.yml
- include: browsers.yml
\ No newline at end of file
- include: browsers.yml
- include: python-pkgs.yml
---
- name: Symbolic link site packages
shell: ln -s -f /usr/local/lib/python2.7/site-packages/ /usr/local/lib/python2.7/dist-packages/
- name: install numpy
shell: pip install numpy==1.6.2
- name: install scipy
shell: pip install scipy==0.11.0
......@@ -3,4 +3,4 @@ start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
exec /usr/bin/Xvfb :1 -screen 0 1024x768x24
\ No newline at end of file
exec /usr/bin/Xvfb :1 -screen 0 1024x768x24
# Set the display to the virtual frame buffer (Xvfb)
export DISPLAY=:1
\ No newline at end of file
export DISPLAY=:1
......@@ -2,4 +2,4 @@
jenkins_home: /var/lib/jenkins
phantomjs_url: https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
phantomjs_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2
phantomjs_folder: phantomjs-1.9.1-linux-x86_64
\ No newline at end of file
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