Voici la documentation : https://geoplateforme.pages.gpf-tech.ign.fr/documentation

Skip to content
Extraits de code Groupes Projets
Valider 8f68de39 rédigé par Jordan Cheraitia's avatar Jordan Cheraitia
Parcourir les fichiers

fix(ci): gitlab pypi job from template

parent c9481a2a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Chargement en cours
Pipeline #76435 réussi avec des avertissements avec les étapes
in 6 minutes et 22 secondes
......@@ -18,12 +18,13 @@ include:
- "/ci/dependency-track.yml"
- "/ci/pre-commit-v1.yml"
- "/ci/sonarqube.yml"
- "/ci/package-py.yml"
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
DOCKERHUB_PROXY: 690uto8c.gra7.container-registry.ovh.net/gpf-dockerhub
IMAGE_REGISTRY: 690uto8c.gra7.container-registry.ovh.net/gpf-dockerhub
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_EXTRA_INDEX_URL: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_API_V4_URL}/groups/55/-/packages/pypi/
......@@ -35,7 +36,6 @@ variables:
POSTGIS_MAJOR: "3.3-alpine"
PYTHON_VERSION_MIN: "3.10"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
......@@ -52,7 +52,7 @@ cache:
# -- LINT JOBS -------------------------------------------------------------------------
flake8:
stage: lint
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
changes:
- "**/*.py"
......@@ -70,7 +70,7 @@ sast:
test:
stage: test
image : ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
image : ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
variables:
POSTGRES_USER: ign
POSTGRES_PASSWORD: ign_password
......@@ -79,7 +79,7 @@ test:
POSTGRES_HOST: localhost
POSTGRES_HOST_AUTH_METHOD: md5
services:
- name: ${DOCKERHUB_PROXY}/postgis/postgis:$PG_MAJOR-$POSTGIS_MAJOR
- name: ${IMAGE_REGISTRY}/postgis/postgis:$PG_MAJOR-$POSTGIS_MAJOR
before_script:
- apt update -qq
......@@ -108,7 +108,7 @@ test:
# -- BUILD JOBS -------------------------------------------------------------------------
build:pip-wheel:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
......@@ -128,7 +128,7 @@ build:pip-wheel:
build:documentation:credits:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
......@@ -156,7 +156,7 @@ build:documentation:credits:
build:documentation:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
......@@ -180,32 +180,12 @@ build:documentation:
when: always
# -- DEPLOYMENT JOBS -------------------------------------------------------------------
gitlab:pypi:
stage: deploy
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
variables:
GIT_STRATEGY: none
TWINE_PASSWORD: "${CI_JOB_TOKEN}"
TWINE_USERNAME: "gitlab-ci-token"
TWINE_REPOSITORY_URL: "https://gitlab.gpf-tech.ign.fr/api/v4/projects/${CI_PROJECT_ID}/packages/pypi"
needs:
- job: build:pip-wheel
artifacts: true
only:
- tags
before_script:
- ls -lavh dist/
- python -m pip install --upgrade pip setuptools wheel
script:
- python -m pip install -U "twine<5"
- python -m twine check dist/*
- python -m twine upload --verbose dist/*
release:prepare:
stage: deploy
allow_failure: true
image:
name: ${DOCKERHUB_PROXY}/alpine/git:latest
name: ${IMAGE_REGISTRY}/alpine/git:latest
entrypoint: [""]
script:
- echo -e '## Changelog\n' >> RELEASE_DESCRIPTION.md
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter