-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (28 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## The Makefile includes instructions on environment setup and lint
setup:
# Create python virtualenv
# Activate virtualenv: 'source ~/.udacity/bin/activate'
# Deactivate virtualenv: 'deactivate'
if [ ! -d ~/.udacity ]; then \
mkdir ~/.udacity; \
fi
python3 -m venv ~/.udacity
install:
# This should be run from inside a virtualenv
pip install --upgrade pip &&\
pip install -r backend/src/requirements.txt
cd frontend &&\
npm install
# Separated target to install hadolint because
# target must be called locally with 'sudo' whereas on CircleCi it must be called without 'sudo'
install_hadolint:
wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.8.0/hadolint-Linux-x86_64 &&\
chmod +x /bin/hadolint
lint:
# See local hadolint install instructions: https://github.com/hadolint/hadolint
# This is linter for Dockerfiles
hadolint backend/Dockerfile
# This is a linter for Python source code linter: https://www.pylint.org/
# This should be run from inside a virtualenv
pylint --disable=R,C,W1203,W1202 backend/src/app.py
all: install install_hadolint lint