From 6b8376c4709a953ac0c8663380d3cb6c0d992efc Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Fri, 21 Feb 2025 06:33:07 +0000 Subject: [PATCH] Added publishing to personal git repo --- Jenkinsfile | 12 ++++++++---- environment.yml | 12 ++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 environment.yml diff --git a/Jenkinsfile b/Jenkinsfile index a11d976..a5de9b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,14 +2,14 @@ pipeline { agent { kubernetes { cloud 'rsys-devel' - defaultContainer 'pip' - inheritFrom 'pip' + defaultContainer 'miniforge3' + inheritFrom 'miniforge' } } stages { stage("install") { steps { - sh 'python -m pip install -r requirements.txt' + sh 'conda env update -n base -f environment.yml' } } stage("unit tests") { @@ -22,11 +22,14 @@ pipeline { 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', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true + archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl, conda-bld/**/*.conda', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } stage("publish") { @@ -42,6 +45,7 @@ pipeline { } 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") { diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..78fcfe0 --- /dev/null +++ b/environment.yml @@ -0,0 +1,12 @@ +name: base +channels: + - bioconda + - conda-forge +dependencies: + - pytest + - pytest-asyncio + - python-build + - conda-build + - twine==6.0.1 + - setuptools_scm + \ No newline at end of file