d10_cs_generator/Jenkinsfile

42 lines
1.2 KiB
Groovy

pipeline {
agent any
options {
skipDefaultCheckout(true)
timestamps()
}
stages {
stage('Checkout') {
steps {
deleteDir()
checkout scm
}
}
stage('Dependencies') {
steps {
sh 'python3 -m venv .venv'
sh '.venv/bin/python -m pip install -r requirements.txt'
}
}
stage('Build and verify') {
steps {
sh '.venv/bin/python -m unittest discover -s tests -v'
sh '.venv/bin/python tools/publish_builds.py'
sh '''
if command -v node >/dev/null 2>&1; then
D10_BUILD_ROOT=RPG/d10_character_sheet node tests/test_tabs.mjs
else
echo 'Node.js is unavailable on this agent; skipping the JavaScript tab check.'
fi
'''
}
}
stage('Publish') {
steps {
archiveArtifacts artifacts: 'RPG/d10_character_sheet/**', fingerprint: true, onlyIfSuccessful: true
}
}
}
}