All checks were successful
autoBIGS.engine/pipeline/head This commit looks good
This reverts commit 79fcce8b8401554f69376f79787a786e5a97f31c.
60 lines
2.4 KiB
Groovy
60 lines
2.4 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-engine -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") {
|
|
environment {
|
|
CREDS = credentials('username-password-rs-git')
|
|
}
|
|
steps {
|
|
sh '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 returnStatus: true, script: 'python -m twine upload -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |