4 Commits

Author SHA1 Message Date
6d3ed48d53 Test
Some checks failed
OB/%00/pipeline/pr-main This commit looks good
CI-Multi/pipeline/pr-main There was a failure building this commit
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_JOB_NAME=TallerCiCd
JENKINS_USER= JENKINS_USER=
JENKINS_TOKEN= JENKINS_TOKEN=
Test

View File

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