From 1c63a6a5500f83251693122a945b5f237ff79dbe Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Tue, 9 Jan 2024 14:56:34 +0100 Subject: [PATCH] publish package --- .gitignore | 3 ++- .gitlab-ci.yml | 16 ++++------------ requirements-dev.txt | 2 ++ 3 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.gitignore b/.gitignore index c6dee3f..8885331 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ .vscode venv .DS_Store -.idea \ No newline at end of file +.idea +dist \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb3d4a2..00bc33d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,16 +18,8 @@ test: upload: stage: deploy needs: ['test', ] - image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0 + image: python:3.11 script: - - CHART_VERSION=$(helm show chart shiny-server | grep version | cut -d' ' -f2) - - CHART_NAME=$(helm show chart shiny-server | grep name | cut -d' ' -f2) - - | - if [ "helm" == "${CI_COMMIT_REF_SLUG}" ]; then - export CHANNEL="stable" - else - export CHANNEL="${CI_COMMIT_REF_SLUG}" - fi - echo $CHANNEL - - helm package shiny-server - - curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@${CHART_NAME}-${CHART_VERSION}.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${CHANNEL}/charts" \ No newline at end of file + - pip install -r requirements-dev.txt + - python setup.py sdist + - python -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/* diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..6cea7e6 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,2 @@ +setuptools +twine \ No newline at end of file -- GitLab