Update CI job
This commit is contained in:
@@ -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,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Cleanup') {
|
}
|
||||||
agent any
|
|
||||||
steps {
|
post {
|
||||||
cleanWs()
|
always {
|
||||||
}
|
cleanWs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user