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> ...@@ -5,3 +5,6 @@ Vik Paruchuri <vik@edx.org>
Jason Bau <jbau@stanford.edu> Jason Bau <jbau@stanford.edu>
Ed Zarecor <ed@edx.org> Ed Zarecor <ed@edx.org>
John Kern <kern3020@gmail.com> John Kern <kern3020@gmail.com>
Will Daly <will@edx.org>
Bethany LaPenta <lapentab@mit.edu>
Jay Zoldak <zoldak@edx.org>
...@@ -57,4 +57,5 @@ ...@@ -57,4 +57,5 @@
shell: mv chromedriver /usr/local/bin/chromedriver shell: mv chromedriver /usr/local/bin/chromedriver
- name: Install Chromedriver 4 - name: Install Chromedriver 4
shell: chmod go+rx /usr/local/bin/chromedriver shell: chmod go+rx /usr/local/bin/chromedriver
\ No newline at end of file
---
- 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 - name: Install Jenkins
shell: wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - shell: wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
...@@ -12,12 +15,11 @@ ...@@ -12,12 +15,11 @@
apt: pkg=jenkins state=present apt: pkg=jenkins state=present
- name: Make plugins directory - name: Make plugins directory
sudo_user: jenkins
shell: mkdir -p {{ jenkins_home }}/plugins shell: mkdir -p {{ jenkins_home }}/plugins
- name: Mod plugins directory permissions
shell: chmod -R 777 {{ jenkins_home }}/plugins
- name: Install Jenkins plugins - name: Install Jenkins plugins
sudo_user: jenkins
get_url: url=http://updates.jenkins-ci.org/latest/${item} get_url: url=http://updates.jenkins-ci.org/latest/${item}
dest={{ jenkins_home }}/plugins/${item} dest={{ jenkins_home }}/plugins/${item}
with_items: with_items:
...@@ -64,39 +66,3 @@ ...@@ -64,39 +66,3 @@
- violations.hpi - violations.hpi
notify: notify:
- restart Jenkins - 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: jenkins.yml
- include: config-backup.yml
- include: xvfb.yml - include: xvfb.yml
- include: browsers.yml - include: browsers.yml
\ No newline at end of file - 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 ...@@ -3,4 +3,4 @@ start on (net-device-up
and local-filesystems and local-filesystems
and runlevel [2345]) and runlevel [2345])
stop on runlevel [016] stop on runlevel [016]
exec /usr/bin/Xvfb :1 -screen 0 1024x768x24 exec /usr/bin/Xvfb :1 -screen 0 1024x768x24
\ No newline at end of file
# Set the display to the virtual frame buffer (Xvfb) # Set the display to the virtual frame buffer (Xvfb)
export DISPLAY=:1 export DISPLAY=:1
\ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
jenkins_home: /var/lib/jenkins jenkins_home: /var/lib/jenkins
phantomjs_url: https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 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_archive: phantomjs-1.9.1-linux-x86_64.tar.bz2
phantomjs_folder: phantomjs-1.9.1-linux-x86_64 phantomjs_folder: phantomjs-1.9.1-linux-x86_64
\ No newline at end of file
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