Harrison Deng 41c05cc521 Increased user friendliness
Added default MLST scheme
Added multiple ways of defining a MLST scheme
CSV output now shows database name for each scheme ID
Now uses native argparse library for ensuring mutual exclusivity of arguments and whether or not one is required.
Updated to use 0.13.* of engine
2025-02-26 07:37:34 +00:00

64 lines
2.5 KiB
Groovy

pipeline {
agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'miniforge3'
inheritFrom 'miniforge'
}
}
stages {
stage("install") {
steps {
sh 'conda env update -n base -f environment.yml'
}
}
stage("unit tests") {
steps {
sh returnStatus: true, script: "python -m pytest --junitxml=test_results.xml --cov=src --cov-report xml:coverage.xml"
xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test_results.xml', stopProcessingIfError: true)]
recordCoverage(tools: [[parser: 'COBERTURA', pattern: 'coverage.xml']])
}
}
stage("build") {
steps {
sh "python -m build"
sh "grayskull pypi dist/*.tar.gz --maintainers 'Harrison Deng'"
sh "python scripts/patch_recipe.py"
sh 'conda build autobigs-cli -c bioconda --output-folder conda-bld --verify'
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl, conda-bld/**/*.conda', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
stage("publish") {
parallel {
stage ("git.reslate.systems") {
when {
branch '**/main'
}
environment {
CREDS = credentials('username-password-rs-git')
}
steps {
sh script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/ydeng/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*'
sh 'curl --user ${CREDS_USR}:${CREDS_PSW} --upload-file conda-bld/**/*.conda https://git.reslate.systems/api/packages/${CREDS_USR}/conda/$(basename conda-bld/**/*.conda)'
}
}
stage ("pypi.org") {
when {
tag '*.*.*'
}
environment {
TOKEN = credentials('pypi.org')
}
steps {
sh script: 'python -m twine upload -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*'
}
}
}
}
}
}