Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 4956815b rédigé par Erwan BOUSSE's avatar Erwan BOUSSE
Parcourir les fichiers

Add WIP CI pipeline

parent d24f8336
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #75389 réussi
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
stages:
- verification
- publish_docker
- automated_acceptance_testing
unit_testing:
stage: verification
image: docker.io/python:3-slim
script:
- cd app
- pip install -r requirements.txt
- pip install -r tests/requirements.txt
- mkdir -p reports
- pytest --junitxml=reports/test-report.xml --cov --cov-report term --cov-report xml:reports/test-coverage.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: app/reports/test-coverage.xml
junit: app/reports/test-report.xml
rules:
- changes:
- app/**
- .gitlab-ci.yml
static_analysis:
stage: verification
image: docker.io/python:3-slim
script:
- cd app
- pip install flake8
- flake8 --output-file=reports/static-analysis-flake8.txt --tee main tests
artifacts:
paths:
- app/reports
rules:
- changes:
- app/**
- .gitlab-ci.yml
publish_docker:
stage: publish_docker
image:
name: gcr.io/kaniko-project/executor:v1.13.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}/app"
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--dockerfile "${CI_PROJECT_DIR}/app/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}"
--destination "${CI_REGISTRY_IMAGE}:latest"
rules:
- changes:
- app/**
- .gitlab-ci.yml
# automated_acceptance_testing:
# stage: automated_acceptance_testing
# image: docker.io/python:3-slim
# services:
# - name: docker.io/selenium/standalone-firefox:latest
# alias: selenium
# - name: "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}"
# - name:
# variables:
# ACCEPTATION_DEPLOYMENT_URL: http://127.0.0.1:5000
# REMOTE_DRIVER_HOST: selenium
# script:
# - cd acceptance
# - pip install .
# - pytest --verbosity=10
# TODO :
# - deploy_testing
# - deploy_staging
# - deploy_production
# make a proper software release + release notes?
\ No newline at end of file
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