Permalink
Newer
Older
100644 99 lines (84 sloc) 2.79 KB
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
1 # Makefile for building & starting rep-containers
Mar 12, 2016 @astiunov Got rid of patching handlers in config
2 # arguments can be supplied by -e definitions:
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
3 #
Mar 12, 2016 @astiunov Fixed bugs in Makefile
4 # TESTS -- list of tests to run
5 # M -- commit message
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
6 #
7 #
8
9 SHELL := /bin/bash
10 TEST_OPTIONS := -s tests -N 2
Mar 5, 2016 @anaderi travis.yml added
11 TESTS := test_happy_mp
Mar 15, 2016 @astiunov Fixed bug #69
12 IP = $(shell python -c 'from IPython.utils.localinterfaces import public_ips; print (public_ips()[0])' 2>/dev/null)
13 OPTIONS = --debug --port 8000 --no-ssl --JupyterHub.hub_ip=${IP}
Mar 7, 2016 @anaderi take uploaddir from env
14 UPLOADDIR ?= ~/upload_screens
Mar 12, 2016 @astiunov Got rid of patching handlers in config
15 PYTHON_MAJOR = $(shell python -c 'import sys; print(sys.version_info[0])')
16 IS_PYTHON3 = $(shell which python3)
17
18 ifeq (${PYTHON_MAJOR}, 3)
19 PYTHON = python
20 PIP = pip
21 else ifdef IS_PYTHON3
22 PYTHON = python3
23 PIP = pip3
24 else
25 $(error Unable to find python)
26 endif
27
Mar 24, 2016 @anaderi os detection in Makefile
28 ifeq ($(shell uname -s),Linux)
Mar 6, 2016 @anaderi spawner.container_ip substitution
29 SPAWNER_IP = "127.0.0.1"
Mar 17, 2016 @betatim Updating install instructions and splitting config files
30 else
Mar 24, 2016 @anaderi os detection in Makefile
31 SPAWNER_IP = "192.168.99.100"
Mar 6, 2016 @anaderi spawner.container_ip substitution
32 endif
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
33
Apr 4, 2017 @anaderi updated configs and makefile to deploy everware as docker image
34 include run.makefile
Mar 24, 2016 @anaderi os detection in Makefile
35
Mar 17, 2016 @anaderi makefile clean-up, client logs, wait 1 sec
36 .PHONY: install reload clean run run-daemon stop test tail
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
37
38 help:
39 @echo Usage: make [-e VARIABLE=VALUE] targets
40 @echo "variables:"
41 @grep -h "#\s\+\w\+ -- " $(MAKEFILE_LIST) |sed "s/#\s//"
42 @echo
43 @echo targets and corresponding dependencies:
Mar 12, 2016 @astiunov Fixed bugs in Makefile
44 @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' -e 's/^/ /' | sed -e 's/##//'
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
45
46 install: ## install everware
47 npm install
Mar 14, 2016 @anaderi fix Makefile
48 npm install configurable-http-proxy
Mar 17, 2016 @betatim Updating install instructions and splitting config files
49 ${PIP} install $${PIP_OPTIONS} -r requirements.txt
50 ${PIP} install -e .
51 ${PYTHON} setup.py css
Mar 12, 2016 @astiunov Got rid of patching handlers in config
52 ${PYTHON} setup.py js
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
53
54 if [ ! -f env.sh ] ; then cp env.sh.orig env.sh ; fi
55
Apr 6, 2017 @anaderi fix makefiles
56 docker-build: ## build docker image
57 docker build --no-cache -t everware/everware:0.10.0 .
Mar 5, 2016 @anaderi scripts -> makefile; initial web-testing
58
Apr 4, 2017 @anaderi updated configs and makefile to deploy everware as docker image
59 clean: ## clean user base
60 if [ -f ${PIDFILE} ] ; then echo "${PIDFILE} exists, cannot continute" ; exit 1; fi
61 rm -f jupyterhub.sqlite
62
63 run-linux: clean ## run everware server on linux
64 source ./env.sh && \
65 ${EXECUTOR} -f etc/local_config.py --no-ssl 2>&1 | tee ${LOG}
66
Mar 17, 2016 @anaderi makefile clean-up, client logs, wait 1 sec
67 test: ## run all tests
68 export UPLOADDIR=${UPLOADDIR}; \
Mar 29, 2017 @astiunov fix tests
69 py.test everware/ && \
Mar 18, 2016 @anaderi frontend testing refactoring
70 build_tools/test_frontend.sh --Spawner.container_ip=${SPAWNER_IP}
Mar 6, 2016 @anaderi docker is back
71
Mar 7, 2016 @anaderi screens upload test
72 gistup: ## install gistup
Mar 7, 2016 @anaderi pre-download docker image
73 git clone https://github.com/anaderi/gistup.git src/gistup
74 cd src/gistup ; \
Mar 7, 2016 @anaderi screens upload test
75 npm install -g
76
77 upload_screens: ## upload screenshots of failed tests
78 @which gistup > /dev/null || (echo "setup https://github.com/anaderi/gistup first" && exit 1 )
Mar 7, 2016 @anaderi take uploaddir from env
79 echo ${UPLOADDIR}
Mar 15, 2016 @anaderi ModuleImportFailure? wut?
80 if [[ -d ${UPLOADDIR} && `find ${UPLOADDIR} -not -path "*/.git/*" -type f -print` != "" ]] ; then \
Mar 6, 2016 @anaderi simplify testing for upload of screenshots
81 cd ${UPLOADDIR} ; \
Mar 8, 2016 @anaderi removed obsolete comments, rearranged upload_screens target
82 if [ ! -d ".git" ] ; then \
83 if [[ ! -f ~/.gistup.json ]] ; then \
84 if [ -n "$${GIST_TOKEN}" ] ; then \
85 echo "{\"token\": \"$${GIST_TOKEN}\", \"protocol\": \"https\" }" > ~/.gistup.json ; \
86 else \
87 echo "no GIST_TOKEN specified. exit"; exit 1; \
88 fi ; \
89 fi ;\
Mar 8, 2016 @anaderi local testing of screens upload
90 OPTIONS="--no-open" ; \
Mar 15, 2016 @anaderi one proc, quoted
91 if [ "${M}" != "" ] ; then OPTIONS+=" --description '${M}'" ; fi ;\
Mar 8, 2016 @anaderi local testing of screens upload
92 gistup $${OPTIONS} ; \
Mar 7, 2016 @anaderi parallel frontend script testing
93 else \
94 git add * ;\
95 git commit -am "${M}" ;\
96 git push ;\
Mar 8, 2016 @anaderi removed obsolete comments, rearranged upload_screens target
97 fi ;\
Mar 14, 2016 @anaderi fix Makefile
98 fi