Skip to content

imaemo/jenkins-docker-python-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins, Docker and Python pytest demo

This project demonstrates how to isolate a Python development environment from the OS using Docker. As a bonus, this project also shows how to run Python pytests in Jenkins.

Link to presentation.

The repository for this project is on github.

Demos

Python demo

git remote -v show
tree
python -m maxsum.main.main
python3 -m maxsum.main.main
python3 -m pytest

Docker demo

docker rmi maxsum:build
docker rmi maxsum:manual
docker images
docker build --tag maxsum:manual .
./run python --version
./run python -m maxsum.main.main
./run python -m pytest

Jenkins demo

  • Look at Jenkins configuration
  • Build in Jenkins
  • Look at Jenkins stages durations
  • Build again in Jenkins
  • Look at Jenkins stages durations

Break a test demo

./run python -m pytest
git push origin master
  • Build in Jenkins
  • Look at tests results in Jenkins

About

A demo of Python pytests using Docker in a Jenkins Pipeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.4%
  • Shell 9.6%