pypi repository settings and uploading
This commit is contained in:
parent
1878a57f5b
commit
778e0a4b68
|
@ -11,6 +11,7 @@ variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
PIP_EXTRA_INDEX_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi/simple
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
|
@ -69,7 +70,6 @@ build_dep_wheels:
|
||||||
matrix:
|
matrix:
|
||||||
- DOCKER_ARCH: [amd64, i386, arm64v8, arm32v7]
|
- DOCKER_ARCH: [amd64, i386, arm64v8, arm32v7]
|
||||||
before_script:
|
before_script:
|
||||||
- *time_script
|
|
||||||
- >
|
- >
|
||||||
apk add
|
apk add
|
||||||
alpine-sdk
|
alpine-sdk
|
||||||
|
@ -86,7 +86,7 @@ build_dep_wheels:
|
||||||
poetry
|
poetry
|
||||||
py3-pip
|
py3-pip
|
||||||
patchelf
|
patchelf
|
||||||
- pip install auditwheel
|
- pip install auditwheel twine
|
||||||
- cd api ; poetry export --without-hashes > ../requirements.txt ; cd ..
|
- cd api ; poetry export --without-hashes > ../requirements.txt ; cd ..
|
||||||
- python -m venv venv
|
- python -m venv venv
|
||||||
- venv/bin/pip install --upgrade pip wheel
|
- venv/bin/pip install --upgrade pip wheel
|
||||||
|
@ -96,7 +96,7 @@ build_dep_wheels:
|
||||||
- *time_script
|
- *time_script
|
||||||
# build basic wheels
|
# build basic wheels
|
||||||
- venv/bin/pip wheel --check-build-dependencies -w wheelhouse -r requirements.txt
|
- venv/bin/pip wheel --check-build-dependencies -w wheelhouse -r requirements.txt
|
||||||
# remove universal wheels (those are probably downloaded from pypi or already uploaded)
|
# remove universal wheels (those are probably downloaded from pypi or our repo)
|
||||||
- rm -f wheelhouse/*-none-any.whl wheelhouse/*-musllinux_*.whl
|
- rm -f wheelhouse/*-none-any.whl wheelhouse/*-musllinux_*.whl
|
||||||
- ls -l wheelhouse
|
- ls -l wheelhouse
|
||||||
- |
|
- |
|
||||||
|
@ -122,9 +122,12 @@ build_dep_wheels:
|
||||||
# remove basic wheels as we have universal wheels now
|
# remove basic wheels as we have universal wheels now
|
||||||
- rm -f wheelhouse/*-linux*.whl wheelhouse/*.linux*.whl
|
- rm -f wheelhouse/*-linux*.whl wheelhouse/*.linux*.whl
|
||||||
- ls -l wheelhouse
|
- ls -l wheelhouse
|
||||||
## populate cache with universal wheels for next runs
|
- |
|
||||||
#- pip install wheelhouse/*.whl
|
# upload wheels to gitlab package repository
|
||||||
# doesn't work, need to find other way
|
export TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token
|
||||||
|
for wheel in wheelhouse/* ; do
|
||||||
|
twine upload --disable-progress-bar --repository-url "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi" "$wheel" || true
|
||||||
|
done
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 weeks
|
expire_in: 2 weeks
|
||||||
paths:
|
paths:
|
||||||
|
|
Loading…
Reference in New Issue