From c9bc645cc3f5db1fba0b05365d0248ae621e73a6 Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 3 May 2023 08:34:50 -0500 Subject: [PATCH 1/5] Updated pipeline to take advantage of new build container image --- Jenkinsfile | 5 ++--- environment.yml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 51d99dc..c9e2633 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,8 +8,7 @@ pipeline { } stage("install") { steps { - sh 'mamba env update --file environment.yml' - sh 'echo "mamba activate filterfasta" >> ~/.bashrc' + sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env' } } stage("build") { @@ -25,7 +24,7 @@ pipeline { } stage("archive") { steps { - archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl' + archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } stage("publish") { diff --git a/environment.yml b/environment.yml index 9ababcb..05c76ca 100644 --- a/environment.yml +++ b/environment.yml @@ -7,3 +7,4 @@ dependencies: - twine=4 - biopython=1.81 - python=3.11 +prefix: ./env \ No newline at end of file From 1b08cee02710c880361adcce3fde8471fc1ceffb Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Tue, 25 Jul 2023 15:56:35 +0000 Subject: [PATCH 2/5] Bumped version number --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e9feeec..b120fc7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = filterfasta -version = 0.0.2 +version = 0.0.3 [options] packages = filterfasta From bf357a5524be36ffc2316e52b70f1bf7248fae53 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 14 Nov 2024 21:06:14 +0000 Subject: [PATCH 3/5] Updated CI config to mirror serverside config --- .devcontainer/devcontainer.json | 22 ++++++++++++++++++++++ Jenkinsfile | 4 ++-- requirements.txt | 4 ++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..8c6f3fb --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "pip3 install --user -r requirements.txt", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/Jenkinsfile b/Jenkinsfile index c9e2633..803ed30 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { } stage("install") { steps { - sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env' + sh 'pip install -r requirements.txt' } } stage("build") { @@ -32,7 +32,7 @@ pipeline { branch '**/master' } steps { - withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { + withCredentials([usernamePassword(credentialsId: '4d6f64be-d26d-4f95-8de3-b6a9b0beb311', 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/*" } } diff --git a/requirements.txt b/requirements.txt index 808664b..11067ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,5 @@ Bio==1.5.6 +build +pytest +twine +biopython==1.81 \ No newline at end of file From 6de659df588c853a12faa1de263b78f630ba01c9 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 14 Nov 2024 21:09:53 +0000 Subject: [PATCH 4/5] Added kubernetes selector. --- Jenkinsfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 803ed30..0af102c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,12 @@ pipeline { - agent any - stages { - stage("clean") { - steps { - sh 'rm -rf ./dist/*' - } + agent { + kubernetes { + cloud 'rsys-devel' + defaultContainer 'pip' + inheritFrom 'pip' } + } + stages { stage("install") { steps { sh 'pip install -r requirements.txt' From 59f007873c3403240bac18dc0d55c6cca48324c0 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Thu, 14 Nov 2024 21:18:56 +0000 Subject: [PATCH 5/5] Publish CI step no longer fails build if push is failed --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0af102c..de24050 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { } steps { withCredentials([usernamePassword(credentialsId: '4d6f64be-d26d-4f95-8de3-b6a9b0beb311', 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/*" + sh returnStdout: true, script: "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/*" } } }