Harrison Deng 17384a5c32
All checks were successful
autoBIGS.cli-bioconda/pipeline/head This commit looks good
Changed back to commit only
2025-02-26 18:05:13 +00:00

67 lines
2.5 KiB
Groovy

pipeline {
agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'miniforge3'
inheritFrom 'miniforge'
}
}
environment {
TOOL_VER = """${sh(
returnStdout: true,
script: 'python pypi_latest_ver.py autoBIGS.cli'
)}"""
}
stages {
stage("prepare") {
parallel {
stage("recipes repo") {
steps {
sh 'git config --global --add safe.directory /home/jenkins/agent/workspace/autoBIGS.cli-bioconda_main'
sh 'git config --global --add safe.directory /home/jenkins/agent/workspace/autoBIGS.cli-bioconda_main/auto-updated-bioconda-recipes'
sh 'git clone https://github.com/Syph-and-VPD-Lab/auto-updated-bioconda-recipes.git'
dir('auto-updated-bioconda-recipes') {
sh 'git checkout -b update-autobigs-cli-${TOOL_VER}'
}
}
}
stage("conda") {
steps {
sh 'conda config --add channels bioconda'
sh 'conda env update -n base --file environment.yml'
}
}
}
}
stage("generate recipe") {
steps {
sh 'grayskull pypi autoBIGS.cli --maintainers "Harrison Deng"'
sh 'python patch_recipe.py'
sh 'cp -r autobigs-cli/* auto-updated-bioconda-recipes/recipes/autobigs-cli/.'
}
}
stage("build") {
steps {
sh 'conda build auto-updated-bioconda-recipes/recipes/autobigs-cli --output-folder ./conda-bld'
}
}
stage('lint') {
steps {
dir('auto-updated-bioconda-recipes') {
sh 'bioconda-utils lint recipes/ --packages autobigs-cli'
}
}
}
stage('commit') {
environment {
TOKEN = credentials('github.com')
}
steps {
dir('auto-updated-bioconda-recipes') {
sh 'git commit -a -m "Automatically updated autobigs-cli bioconda recipe to ${TOOL_VER}."'
sh 'git push https://${TOKEN}@github.com/Syph-and-VPD-Lab/auto-updated-bioconda-recipes.git update-autobigs-cli-${TOOL_VER}'
}
}
}
}
}