From 6b3c9c312e47c8a6f6361d4f851c6f45e6c812b0 Mon Sep 17 00:00:00 2001 From: Harrison Date: Fri, 21 Apr 2023 11:44:01 -0500 Subject: [PATCH] Added 'Jenkinsfile' and 'environment.yml' --- Jenkinsfile | 36 ++++++++++++++++++++++++++++++++++++ environment.yml | 8 ++++++++ 2 files changed, 44 insertions(+) create mode 100644 Jenkinsfile create mode 100644 environment.yml diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..0418309 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,36 @@ +pipeline { + agent any + stages { + stage("clean") { + steps { + sh 'rm -rf ./dist/*' + } + } + stage("install") { + steps { + sh 'mamba env update --file environment.yml' + sh 'echo "mamba activate bmlsa" >> ~/.bashrc' + } + } + stage("build") { + steps { + sh "python -m build" + } + } + stage("test") { + steps { + sh "pip install dist/*.whl" + } + } + stage("publish") { + when { + branch '**/master' + } + steps { + withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { + sh "python -m twine upload --repository-url https://git.reslate.systems/api/packages/${USER}/pypi -u ${USER} -p ${PASS} --non-interactive --disable-progress-bar --verbose dist/*" + } + } + } + } +} \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..9fcaff8 --- /dev/null +++ b/environment.yml @@ -0,0 +1,8 @@ +name: bmlsa +channels: + - conda-forge +dependencies: + - biopython=1.81 + - build=0.7 + - pytest=7 + - twine=4