Hysen Labs
Open-source project
jenkins-docs/simple-python-pyinstaller-app avatar
jenkins-docs

simple-python-pyinstaller-app

For an introductory tutorial on how to use Jenkins to build a simple Python application with PyInstaller.

100 stars6,129 forksPythonLicense varies
01
DEEP OPEN-SOURCE ANALYSIS

add2vals: a tiny app for learning Jenkins with PyInstaller

This repo backs an introductory Jenkins tutorial. It holds add2vals, a command line tool that adds two values, and shows how PyInstaller turns it into a Linux executable inside a pipeline.

02
DEEP OPEN-SOURCE ANALYSIS

The app adds two values, with a twist

The application is a command line tool called add2vals. Given two values it outputs their addition, unless at least one of them is a string, in which case both are treated as text and concatenated instead. The add2 function lives in a calc library that add2vals imports, and it comes with unit tests run through pytest. Results land in a JUnit XML report, which Jenkins can then read.

03
DEEP OPEN-SOURCE ANALYSIS

PyInstaller turns it into a standalone binary

The build story is the point of the repo. PyInstaller packages add2vals into a standalone executable for Linux. You download it through Jenkins and run it from the command line on a machine that has no Python installed at all. That is the full arc of the tutorial compressed into a single deliverable.

04
DEEP OPEN-SOURCE ANALYSIS

The Jenkinsfile example lives in the jenkins folder

The jenkins directory holds an example Jenkinsfile, the pipeline learners are expected to recreate themselves as they follow along. The repository provides the reference version rather than asking people to guess at the syntax.

05
DEEP OPEN-SOURCE ANALYSIS

Everything is sized for a tutorial

The project is deliberately small. It exists to support the introductory Jenkins tutorial linked from the repository homepage, so the code is minimal and the pipeline is the star. The focus sits on demonstrating a PyInstaller build inside Jenkins, not on showing off the Python itself, which stays bare bones. The homepage links to the tutorial directly, so the repo and the walkthrough are meant to be read together.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes