Skip to content

Commit

Permalink
Merge pull request openedx-unsupported#1055 from edx/zoldak/jenkins-r…
Browse files Browse the repository at this point in the history
…eset-venv2

Modify jenkins worker task to run the wheel script
  • Loading branch information
Jay Zoldak committed Apr 30, 2014
2 parents ccf6cdd + 2618933 commit d9b9bdb
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 d9b9bdb

Please sign in to comment.