From 082509cccbc9cd9202668e1ec1fd1d4cbda5cad8 Mon Sep 17 00:00:00 2001 From: Iskken Date: Thu, 9 Jul 2026 01:44:19 +0200 Subject: [PATCH] Complete Jenkins Setup --- Jenkinsfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..4083153 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,41 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + // Fetch the exact revision that triggered this Jenkins run + steps { + checkout scm + } + } + + stage('Install Dependencies') { + // Create an isolated virtualenv in the workspace and install + // glassboxml (editable) plus pytest into it, mirroring the + // "Install dependencies" step in .github/workflows/tests.yml + steps { + sh ''' + python3 -m venv .venv + .venv/bin/pip install --upgrade pip + .venv/bin/pip install -e . + .venv/bin/pip install pytest + ''' + } + } + + stage('Run Tests') { + // Same command CI runs: the full pytest suite + steps { + sh '.venv/bin/pytest' + } + } + + stage('Build Docker Image') { + // Validate the Dockerfile at the repo root still builds cleanly, + // same command used locally and in the docker-build CI job + steps { + sh 'docker build -t glassboxml-webapp .' + } + } + } +}