Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DZDTools
CoDaBuddy
Commits
0be7a921
Commit
0be7a921
authored
Feb 16, 2022
by
Tim Bleimehl
🤸🏼
Browse files
rename wip
parent
befcd677
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
0be7a921
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/*
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment