Skip to content
Snippets Groups Projects
Commit ef9d4f2c authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Add placeholder ci/cd pipeline and dummy package

parent 5ce8eb11
No related branches found
No related tags found
No related merge requests found
Pipeline #39004 failed
default:
image: python3.10-slim
stages:
- lint
- test
- build
- publish # publish instead of deploy
# Caching of dependencies to speed up builds
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
# Make sure each step is executed in a virtual environment with some basic dependencies present
before_script:
- python --version # For debugging
- pip install --upgrade virtualenv twine wheel pipenv black flake8 # common packaging requirements
- virtualenv venv --system-site-packages #provide the installed packages
- source venv/bin/activate
run_black:
stage: lint
script:
- echo "run black"
run_flake8:
stage: lint
script:
- echo "run flake8"
run_unit_tests:
stage: test
script:
- echo "run python unit tests"
package_files:
stage: build
# add storing of the build artefact
script:
- echo "python setup.py sdist bdist_wheel # or something similar"
publish_on_gitlab:
stage: publish
environment: gitlab
script:
- echo "run twine for gitlab"
# - sed -i "s/BUILD_ID/.dev${CI_JOB_ID}/g" VERSION
# - python setup.py sdist bdist_wheel # todo replace this with reading the build artefact
# - |
# 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/*
publish_on_pipy:
stage: publish
environment: pipy
script:
- echo "run twine for pipy"
# - sed -i "s/BUILD_ID/.dev${CI_JOB_ID}/g" VERSION
# - python setup.py sdist bdist_wheel # todo replace this with reading the build artefact from `package_file`` step
# - |
# TWINE_PASSWORD=${PIPY_TOKEN} \
# TWINE_USERNAME=${PIPY_USERNAME} \
# python -m twine upload \
# --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
# TODO: replace URL with a pipy URL
""" My Awesome Package """
""" Cool module containing functions, classes and other useful things """
def greeter():
print("Hello World!")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment