Commit 0be7a921 authored by Tim Bleimehl's avatar Tim Bleimehl 🤸🏼
Browse files

rename wip

parent befcd677
image: docker:git
stages:
- local-image-build-n-push
- deploy-python-module
Docker Build n Push Tags:
stage: local-image-build-n-push
only:
- tags
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --no-cache . -t $CI_REGISTRY_IMAGE:prod -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- docker push $CI_REGISTRY_IMAGE --all-tags
Docker Build n Push Latest:
stage: local-image-build-n-push
only:
# Only "master" should be tagged "latest"
- master
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --no-cache . -t $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE --all-tags
Build and Deploy python package:
stage: deploy-python-module
image: python:3
only:
- tags
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
script:
- pip install .
- python setup.py sdist bdist_wheel
- pip install twine
#- 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/*
- TWINE_PASSWORD=${PYPI_TOKEN} TWINE_USERNAME=__token__ python -m twine upload 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