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>
...@@ -58,3 +58,4 @@ ...@@ -58,3 +58,4 @@
- name: Install Chromedriver 4 - name: Install Chromedriver 4
shell: chmod go+rx /usr/local/bin/chromedriver 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 - 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
- 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
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