This repository was archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#77] Introduce Fig - isolated snakebite testing
Notes: * Fig is not integrated with setuptools, running python setup.py test will use Tox for testing * Fig still uses standard python setup.py test (including Tox) but inside separate/isolated OS/container * Requires Docker installed on your machine(!) PR provides fig configuration for: +-------------------- -+-------------+ | description | command | +----------------------+-------------+ | dirty testing image | dirty | | py2.7 and HDP | testPy27hdp | | py2.7 and CDH | testPy27cdh | | py2.6 and HDP | testPy26hdp | | py2.6 and CDH | testPy26cdh | +----------------------+-------------+ So how to start: * fig build ( should build your current dirty image) * fig run testPy27hdp (to run isolated py2.7 tests on HDP) To run all tests at the same time run: * fig up Not tho this is actually requires so resources. Details: 1. Improve setup_env * handle only-download, only-extract, distro-select * add nice flags and nice flag handler 2. Add fig to dev requirements 3. Add Dockerfile for dirty testing image * image used to build dirty testing images * based on ravwojdyla/snakebite_test:base * copies your local dirty code base * install all dev requirements from your dev requirements 4. Add fig configuration file 5. Add Dockerfile for snakebite_test:base * base image for dirty testing images * based on dockerfile/java:oracle-java7 * downloads cdh/hdp tarballs * install python 2.6 and 2.7 * install pip 6. Add script to build snakebite_test:base
- Loading branch information
Rafal Wojdyla
committed
Sep 11, 2014
1 parent
15e2640
commit f897c37
Showing
6 changed files
with
117 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ravwojdyla/snakebite_test:base | ||
|
||
ADD . /snakebite | ||
WORKDIR /snakebite | ||
RUN pip install -r requirements-dev.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
dirty: | ||
build: . | ||
|
||
testPy27cdh: | ||
image: snakebite_dirty | ||
working_dir: /snakebite | ||
environment: | ||
- JAVA_HOME=/usr | ||
- ONLY_EXTRACT=true | ||
command: python2.7 setup.py test --tox-args='-e py27-cdh --recreate' | ||
|
||
testPy27hdp: | ||
image: snakebite_dirty | ||
working_dir: /snakebite | ||
environment: | ||
- JAVA_HOME=/usr | ||
- ONLY_EXTRACT=true | ||
command: python2.7 setup.py test --tox-args='-e py27-hdp --recreate' | ||
|
||
testPy26hdp: | ||
image: snakebite_dirty | ||
working_dir: /snakebite | ||
environment: | ||
- JAVA_HOME=/usr | ||
- ONLY_EXTRACT=true | ||
command: python2.7 setup.py test --tox-args='-e py26-hdp --recreate' | ||
|
||
testPy26cdh: | ||
image: snakebite_dirty | ||
working_dir: /snakebite | ||
environment: | ||
- JAVA_HOME=/usr | ||
- ONLY_EXTRACT=true | ||
command: python2.7 setup.py test --tox-args='-e py26-cdh --recreate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ mock | |
virtualenv>=1.11.2 | ||
tox>=1.7.2 | ||
sphinx | ||
fig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM dockerfile/java:oracle-java7 | ||
|
||
# Push setup_env script | ||
ADD ./ci/setup_env.sh /setup_env.sh | ||
# Download tarballs for both hdp and cdh | ||
RUN /setup_env.sh --only-download --distro hdp | ||
RUN /setup_env.sh --only-download --distro cdh | ||
# since py2.6 is deprecated in Ubuntu image, we need to add | ||
# ppa to install it | ||
RUN add-apt-repository --yes ppa:fkrull/deadsnakes | ||
RUN apt-get update | ||
RUN apt-get install --yes python2.7 python2.6 | ||
# Fetch pip for python requirments | ||
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2.7 | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build snakebite_test:base | ||
docker build -t ravwojdyla/snakebite_test:base . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters