Compare commits
4 Commits
test/main-
...
test/TestJ
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d3ed48d53 | |||
| 295accd825 | |||
| 87b846b4ae | |||
| 330c2a5364 |
@@ -5,3 +5,4 @@ JENKINS_BASE_URL=http://host.docker.internal:8080
|
||||
JENKINS_JOB_NAME=TallerCiCd
|
||||
JENKINS_USER=
|
||||
JENKINS_TOKEN=
|
||||
Test
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
node {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ def random_price(item: str) -> Dict:
|
||||
def prices_payload() -> Dict:
|
||||
return {
|
||||
"items": [random_price(item) for item in PRICE_RANGES.keys()],
|
||||
"disclaimer": "Este es un cambio menor a fin de probar Webhooks.",
|
||||
"disclaimer": "Depende de como pilles al de cafete.",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user