Skip to content

Commit

Permalink
Modify jenkins worker task to run the wheel script to populate the py…
Browse files Browse the repository at this point in the history
…thon virtualenv.
  • Loading branch information
Jay Zoldak committed Apr 29, 2014
1 parent a286959 commit 2618933
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions playbooks/roles/jenkins_worker/tasks/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,26 @@
src=wheel_venv.sh.j2 dest={{ jenkins_home }}/wheel_venv.sh
owner={{ jenkins_user }} group={{ jenkins_group }} mode=700

# Run the wheel_venv.sh script for the first time
# This was previously done in the Jenkins global
# configuration as part of the AMI Init script.
# Moving here so that we can archive a clean snapshot
# of the virtualenv with only the defined packages
# from jenkins_wheels.
- name: Run the wheel_venv.sh script
command: >
./wheel_venv.sh edx-venv
chdir={{ jenkins_home }}
creates={{ jenkins_home }}/edx-venv
sudo_user: "{{ jenkins_user }}"

# Archive the current state of the virtualenv
# as a starting point for new builds
# as a starting point for new builds.
# The edx-venv directory is deleted and then recreated
# cleanly from the archive by the jenkins build scripts.
- name: Create a clean virtualenv archive
command: >
tar -cpzWf {{ jenkins_venv }}_clean.tar.gz {{ jenkins_venv }}
tar -cpzf edx-venv_clean.tar.gz edx-venv
chdir={{ jenkins_home }}
creates={{ jenkins_home }}/{{ jenkins_venv }}_clean.tar.gz
creates={{ jenkins_home }}/edx-venv_clean.tar.gz
sudo_user: "{{ jenkins_user }}"

0 comments on commit 2618933

Please sign in to comment.