pipeline { agent { kubernetes { cloud 'rsys-devel' defaultContainer 'miniforge3' inheritFrom 'miniforge' } } stages { stage("prepare") { parallel { stage("recipes repo") { steps { sh 'git clone https://github.com/Syph-and-VPD-Lab/auto-updated-bioconda-recipes.git' dir('auto-updated-bioconda-recipes') { sh 'git checkout update-autobigs-engine' } } } stage("conda") { steps { sh 'conda env update -n base --file environment.yml' } } } } stage("generate recipe") { steps { sh 'grayskull pypi autoBIGS.engine --maintainers "Harrison Deng"' sh 'python patch_recipe.py' sh 'cp -r autobigs-engine/* auto-updated-bioconda-recipes/recipes/autobigs-engine/.' } } stage("build") { steps { dir('auto-updated-bioconda-recipes') { sh 'conda build recipes/autobigs-engine --output-folder ./conda-dist' } } } stage('publish') { parallel { stage("archive") { steps { archiveArtifacts artifacts: './conda-dist/**/*.conda', followSymlinks: false } } stage("bioconda") { stages { stage('lint') { sh 'bioconda-utils lint recipes/ --packages autobigs-engine' } stage('commit') { environment { TOKEN = credentials('github.com') } steps { dir('auto-updated-bioconda-recipes') { sh 'git commit -a -m "Automatically updated autobigs-engine bioconda recipe to $(python ../pypi_latest_ver.py autoBIGS.engine)."' sh 'git push https://${TOKEN}@github.com/Syph-and-VPD-Lab/auto-updated-bioconda-recipes.git update-autobigs-engine' } } } } } stage('git.reslate.systems') { environment { AUTH = credentials('git.reslate.systems') } steps { sh 'curl --user AUTH_USR:AUTH_PSW --upload-file ./conda-dist/**/*.conda https://git.reslate.systems/api/packages/${AUTH_USR}/conda/package-1.0.conda' } } } } } }