04. Exercise: CircleCI
Exercise: CircleCI
It is easy to look at build servers as a nice to have when they are a must-have for DevOps best practices. One ubiquitous cloud-based build server is CircleCI. In this exercise, you will incorporate many of the concepts from this course: Docker, Makefiles, and build systems.
Instructions
- Follow these instructions for setting up local CircleCI
- Change the template below and add to your
Makefile(this template is similar to what we used in earlier lessons) - Run
validate-circleciandrun-circleci-localfor your project, making sure to change any values that are unique to your project.
Makefile template
setup:
python3 -m venv ~/.udacity-devops
install:
pip install --upgrade pip &&\
pip install -r requirements.txt
test:
#python -m pytest -vv --cov=myrepolib tests/*.py
#python -m pytest --nbval notebook.ipynb
validate-circleci:
# See https://circleci.com/docs/2.0/local-cli/#processing-a-config
circleci config process .circleci/config.yml
run-circleci-local:
# See https://circleci.com/docs/2.0/local-cli/#running-a-job
circleci local execute
lint:
hadolint demos/flask-sklearn/Dockerfile
pylint --disable=R,C,W1203 demos/**/**.py
all: install lint test