forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker and cloudbuild setup for running tox
- Loading branch information
Showing
6 changed files
with
98 additions
and
0 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 @@ | ||
.git | ||
**/__pycache__ | ||
.pytest_cache | ||
.prereqs_cache | ||
**/*.pyc |
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,3 @@ | ||
.git | ||
**/__pycache__ | ||
**/*.pyc |
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,63 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y \ | ||
apt-transport-https \ | ||
build-essential \ | ||
gcc \ | ||
g++ \ | ||
gettext \ | ||
git \ | ||
git-core \ | ||
gfortran \ | ||
golang \ | ||
graphviz \ | ||
graphviz-dev \ | ||
language-pack-en \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
libatlas-base-dev \ | ||
libfreetype6-dev \ | ||
libssl-dev \ | ||
libffi-dev \ | ||
libgeos-dev \ | ||
libjpeg8-dev \ | ||
libsqlite3-dev \ | ||
libmysqlclient-dev \ | ||
libpng12-dev \ | ||
libpq-dev \ | ||
libxml2-dev \ | ||
libxmlsec1-dev \ | ||
libxslt1-dev \ | ||
memcached \ | ||
mongodb \ | ||
openssl \ | ||
pkg-config \ | ||
python-apt \ | ||
python-dev \ | ||
python-mysqldb \ | ||
python-cryptography \ | ||
python-pip \ | ||
python-setuptools \ | ||
python-virtualenv \ | ||
software-properties-common \ | ||
swig \ | ||
&& pip install setuptools -U \ | ||
&& pip install virtualenv \ | ||
&& pip install more-itertools==5.0.0 \ | ||
&& pip install tox | ||
|
||
# COPY nodesource.gpg.key /tmp/nodesource.gpg.key | ||
# RUN apt-key add /tmp/nodesource.gpg.key \ | ||
# && echo 'deb https://deb.nodesource.com/node_8.x xenial main' > /etc/apt/sources.list.d/nodesource.list \ | ||
# && echo 'deb-src https://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list \ | ||
# && apt-get update \ | ||
# && apt-get install -y nodejs | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
ENTRYPOINT ["/app/scripts/docker_tox.sh"] |
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
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,8 @@ | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '-t', 'gcr.io/appsembler-infrastructure/edx-platform-tox', '.'] | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['run', 'gcr.io/appsembler-infrastructure/edx-platform-tox'] | ||
|
||
images: ['gcr.io/appsembler-infrastructure/edx-platform-tox'] | ||
timeout: 7200s |
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,10 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p /data/db | ||
mongod --fork --logpath /tmp/mongod.log | ||
|
||
# Clear the mongo database | ||
# Note that this prevents us from running jobs in parallel on a single worker. | ||
mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})' | ||
|
||
tox |