Commit a8b54683 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Build python package

parent 28d3abaf
image: gricad-registry.univ-grenoble-alpes.fr/kubernetes-alpes/buildah:latest
image: python:3.9
stages:
- build
variables:
REGISTRY_LOGIN: buildah login -u gitlab-ci-token -p $CI_REGISTRY_PASSWORD
REGISTRY_LOGOUT: buildah logout
IMAGE_BUILD: buildah build-using-dockerfile --storage-driver vfs --format docker
IMAGE_PUSH: buildah push --storage-driver vfs
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- $REGISTRY_LOGIN $CI_REGISTRY
after_script:
- $REGISTRY_LOGOUT $CI_REGISTRY
build ws-station: &build
stage: build
only:
- master
variables:
DOCKERFILE: Dockerfile
IMAGE_NAME: $CI_REGISTRY_IMAGE/resifdatareporter:$CI_COMMIT_SHORT_SHA
run:
script:
- $IMAGE_BUILD --file $DOCKERFILE $BUILD_ARG --tag $IMAGE_NAME .
- $IMAGE_PUSH $IMAGE_NAME $IMAGE_NAME
- pip install twine
- python setup.py sdist bdist_wheel
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment