4 Commits

Author SHA1 Message Date
6d3ed48d53 Test
All checks were successful
OB/%00/pipeline/pr-main This commit looks good
2026-02-03 21:55:17 +01:00
295accd825 Merge pull request 'Update CI job' (#20) from bugfix/main-11-WorkspaceCleanup into main
Reviewed-on: #20
2026-01-17 22:46:39 +01:00
87b846b4ae Add node
All checks were successful
CI-Multi/pipeline/pr-main This commit looks good
2026-01-17 22:09:31 +01:00
330c2a5364 Update CI job 2026-01-17 12:33:49 +01:00
2 changed files with 18 additions and 6 deletions

View File

@@ -5,3 +5,4 @@ JENKINS_BASE_URL=http://host.docker.internal:8080
JENKINS_JOB_NAME=TallerCiCd
JENKINS_USER=
JENKINS_TOKEN=
Test

View File

@@ -38,11 +38,12 @@ pipeline {
agent {
docker {
image 'python:3.11-slim'
args '-u root'
}
}
environment {
HOME = "${WORKSPACE}"
PIP_CACHE_DIR = "${WORKSPACE}/.cache/pip"
PYTHONDONTWRITEBYTECODE = 1
}
@@ -50,12 +51,13 @@ pipeline {
dir('backend') {
sh '''
set -e
mkdir -p "$PIP_CACHE_DIR" "$WORKSPACE/.cache/pytest"
python -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install -r requirements-dev.txt
ruff check app tests
pytest
pytest -o cache_dir="$WORKSPACE/.cache/pytest"
'''
}
}
@@ -71,10 +73,15 @@ pipeline {
image 'node:20-slim'
}
}
environment {
HOME = "${WORKSPACE}"
NPM_CONFIG_CACHE = "${WORKSPACE}/.cache/npm"
}
steps {
dir('frontend') {
sh '''
set -e
mkdir -p "$NPM_CONFIG_CACHE"
npm install --no-progress --no-audit --prefer-offline
npm run check
npm run build
@@ -83,11 +90,15 @@ pipeline {
}
}
stage('Cleanup') {
agent any
steps {
cleanWs()
}
post {
always {
script {
node {
cleanWs()
}
}
}
}
}