Compare commits

...

4 Commits

Author SHA1 Message Date
31283d5e49 Merge branch 'master' into develop
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2024-07-21 03:01:39 +00:00
9d97ee6244 Added some extensions for the devcontainer.
Some checks failed
ydeng/splitmsa/pipeline/head There was a failure building this commit
2024-07-21 02:54:01 +00:00
bfeec68756 Added devcontainer to pipeline. 2024-07-21 02:52:25 +00:00
ba4a532784 Bumped package version
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-24 16:23:02 -05:00
5 changed files with 62 additions and 8 deletions

11
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM mcr.microsoft.com/devcontainers/anaconda:1-3
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
{
"name": "Anaconda (Python 3)",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.debugpy",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.flake8"
]
}
}
// 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": "python --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

3
.devcontainer/noop.txt Normal file
View File

@ -0,0 +1,3 @@
This file copied into the container along with environment.yml* from the parent
folder. This file is included to prevents the Dockerfile COPY instruction from
failing if no environment.yml is found.

19
Jenkinsfile vendored
View File

@ -1,21 +1,26 @@
pipeline { pipeline {
agent any agent {
kubernetes {
cloud 'Reslate Systems'
defaultContainer 'conda'
}
}
stages { stages {
stage("install") { stage("install") {
steps { steps {
sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env' sh 'conda update conda -y -q'
sh 'conda env update -n base --file environment.yml'
} }
} }
stage("build") { stage("build") {
steps { steps {
sh 'rm -rf ./dist/*' sh "conda run -n base python -m build"
sh "python -m build"
} }
} }
stage("test") { stage("test") {
steps { steps {
sh "pip install dist/*.whl" sh "conda run -n base pip install dist/*.whl"
sh "splitmsa -h" sh "conda run -n base splitmsa -h"
} }
} }
stage("archive") { stage("archive") {
@ -29,7 +34,7 @@ pipeline {
} }
steps { steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { 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/*" sh "conda run -n base 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/*"
} }
} }
} }

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = splitmsa name = splitmsa
version = 0.0.3 version = 0.0.4
[options] [options]
packages = splitmsa packages = splitmsa