mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Merge branch 'beta' into 'master'
Better CI See merge request bde/nk20!105
This commit is contained in:
		@@ -1,33 +1,21 @@
 | 
				
			|||||||
stages:
 | 
					stages:
 | 
				
			||||||
  - build_docker_image
 | 
					 | 
				
			||||||
  - test
 | 
					  - test
 | 
				
			||||||
  - quality-assurance
 | 
					  - quality-assurance
 | 
				
			||||||
 | 
					
 | 
				
			||||||
docker:
 | 
					 | 
				
			||||||
  stage: build_docker_image
 | 
					 | 
				
			||||||
  image:
 | 
					 | 
				
			||||||
    name: gcr.io/kaniko-project/executor:debug
 | 
					 | 
				
			||||||
    entrypoint: [""]
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - mkdir -p /kaniko/.docker
 | 
					 | 
				
			||||||
    - echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$CI_BUILD_TOKEN\"}}}" > /kaniko/.docker/config.json
 | 
					 | 
				
			||||||
    - /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest --destination $CI_REGISTRY_IMAGE:debian
 | 
					 | 
				
			||||||
  only:
 | 
					 | 
				
			||||||
    - master
 | 
					 | 
				
			||||||
    - beta
 | 
					 | 
				
			||||||
  cache:
 | 
					 | 
				
			||||||
    key: one-key-to-rule-them-all
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
      - /cache/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Debian Buster
 | 
					# Debian Buster
 | 
				
			||||||
py37-django22:
 | 
					py37-django22:
 | 
				
			||||||
  stage: test
 | 
					  stage: test
 | 
				
			||||||
  image:
 | 
					  image: debian:buster-backports
 | 
				
			||||||
    name: $CI_REGISTRY_IMAGE:debian
 | 
					 | 
				
			||||||
    entrypoint: [""]
 | 
					 | 
				
			||||||
  before_script:
 | 
					  before_script:
 | 
				
			||||||
    - apt-get update && apt-get install -y tox
 | 
					    - >
 | 
				
			||||||
 | 
					        apt-get update &&
 | 
				
			||||||
 | 
					        apt-get install --no-install-recommends -t buster-backports -y
 | 
				
			||||||
 | 
					        python3-django python3-django-crispy-forms
 | 
				
			||||||
 | 
					        python3-django-extensions python3-django-filters python3-django-polymorphic
 | 
				
			||||||
 | 
					        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil
 | 
				
			||||||
 | 
					        python3-babel python3-lockfile python3-pip python3-phonenumbers
 | 
				
			||||||
 | 
					        python3-bs4 python3-setuptools tox
 | 
				
			||||||
 | 
					        texlive-latex-base texlive-lang-french lmodern texlive-fonts-recommended
 | 
				
			||||||
  script: tox -e py37-django22
 | 
					  script: tox -e py37-django22
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ubuntu 20.04
 | 
					# Ubuntu 20.04
 | 
				
			||||||
@@ -39,21 +27,28 @@ py38-django22:
 | 
				
			|||||||
    - ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
 | 
					    - ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
 | 
				
			||||||
    - >
 | 
					    - >
 | 
				
			||||||
        apt-get update &&
 | 
					        apt-get update &&
 | 
				
			||||||
        apt-get install -y python3-django python3-django-crispy-forms
 | 
					        apt-get install --no-install-recommends -y
 | 
				
			||||||
 | 
					        python3-django python3-django-crispy-forms
 | 
				
			||||||
        python3-django-extensions python3-django-filters python3-django-polymorphic
 | 
					        python3-django-extensions python3-django-filters python3-django-polymorphic
 | 
				
			||||||
        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil
 | 
					        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil
 | 
				
			||||||
        python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3
 | 
					        python3-babel python3-lockfile python3-pip python3-phonenumbers
 | 
				
			||||||
        gettext libjs-bootstrap4 fonts-font-awesome tox &&
 | 
					        python3-bs4 python3-setuptools tox
 | 
				
			||||||
        rm -rf /var/lib/apt/lists/*
 | 
					        texlive-latex-base texlive-lang-french lmodern texlive-fonts-recommended
 | 
				
			||||||
  script: tox -e py38-django22
 | 
					  script: tox -e py38-django22
 | 
				
			||||||
 | 
					
 | 
				
			||||||
linters:
 | 
					linters:
 | 
				
			||||||
  stage: quality-assurance
 | 
					  stage: quality-assurance
 | 
				
			||||||
  image:
 | 
					  image: debian:buster-backports
 | 
				
			||||||
    name: $CI_REGISTRY_IMAGE:debian
 | 
					 | 
				
			||||||
    entrypoint: [""]
 | 
					 | 
				
			||||||
  before_script:
 | 
					  before_script:
 | 
				
			||||||
    - apt-get update && apt-get install -y tox
 | 
					    - >
 | 
				
			||||||
 | 
					        apt-get update &&
 | 
				
			||||||
 | 
					        apt-get install --no-install-recommends -t buster-backports -y
 | 
				
			||||||
 | 
					        python3-django python3-django-crispy-forms
 | 
				
			||||||
 | 
					        python3-django-extensions python3-django-filters python3-django-polymorphic
 | 
				
			||||||
 | 
					        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil
 | 
				
			||||||
 | 
					        python3-babel python3-lockfile python3-pip python3-phonenumbers
 | 
				
			||||||
 | 
					        python3-bs4 python3-setuptools tox
 | 
				
			||||||
 | 
					        texlive-latex-extra texlive-lang-french lmodern texlive-fonts-recommended
 | 
				
			||||||
  script: tox -e linters
 | 
					  script: tox -e linters
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Be nice to new contributors, but please use `tox`
 | 
					  # Be nice to new contributors, but please use `tox`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ RUN apt-get update && \
 | 
				
			|||||||
    python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3 \
 | 
					    python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3 \
 | 
				
			||||||
    python3-bs4 python3-setuptools \
 | 
					    python3-bs4 python3-setuptools \
 | 
				
			||||||
    uwsgi uwsgi-plugin-python3 \
 | 
					    uwsgi uwsgi-plugin-python3 \
 | 
				
			||||||
    texlive-latex-extra texlive-lang-french lmodern texlive-fonts-recommended \
 | 
					    texlive-latex-base texlive-lang-french lmodern texlive-fonts-recommended \
 | 
				
			||||||
    gettext libjs-bootstrap4 fonts-font-awesome && \
 | 
					    gettext libjs-bootstrap4 fonts-font-awesome && \
 | 
				
			||||||
    rm -rf /var/lib/apt/lists/*
 | 
					    rm -rf /var/lib/apt/lists/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,12 +25,14 @@ Sinon vous pouvez suivre les étapes ici.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ```bash
 | 
					    ```bash
 | 
				
			||||||
    $ sudo apt update
 | 
					    $ sudo apt update
 | 
				
			||||||
    $ sudo apt install -t buster-backports -y python3-django python3-django-crispy-forms \
 | 
					    $ sudo apt install --no-install-recommends -t buster-backports -y \
 | 
				
			||||||
 | 
					        python3-django python3-django-crispy-forms \
 | 
				
			||||||
        python3-django-extensions python3-django-filters python3-django-polymorphic \
 | 
					        python3-django-extensions python3-django-filters python3-django-polymorphic \
 | 
				
			||||||
        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil \
 | 
					        python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil \
 | 
				
			||||||
        python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3 \
 | 
					        python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3 \
 | 
				
			||||||
 | 
					        python3-bs4 python3-setuptools \
 | 
				
			||||||
        uwsgi uwsgi-plugin-python3 \
 | 
					        uwsgi uwsgi-plugin-python3 \
 | 
				
			||||||
        texlive-latex-extra texlive-fonts-extra texlive-lang-french \
 | 
					        texlive-latex-base texlive-lang-french lmodern texlive-fonts-recommended \
 | 
				
			||||||
        gettext libjs-bootstrap4 fonts-font-awesome \
 | 
					        gettext libjs-bootstrap4 fonts-font-awesome \
 | 
				
			||||||
        nginx python3-venv git acl
 | 
					        nginx python3-venv git acl
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,6 +8,7 @@
 | 
				
			|||||||
  apt:
 | 
					  apt:
 | 
				
			||||||
    update_cache: true
 | 
					    update_cache: true
 | 
				
			||||||
    default_release: buster-backports
 | 
					    default_release: buster-backports
 | 
				
			||||||
 | 
					    install_recommends: false
 | 
				
			||||||
    name:
 | 
					    name:
 | 
				
			||||||
      # Common tools
 | 
					      # Common tools
 | 
				
			||||||
      - gettext
 | 
					      - gettext
 | 
				
			||||||
@@ -20,6 +21,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      # Python dependencies
 | 
					      # Python dependencies
 | 
				
			||||||
      - python3-babel
 | 
					      - python3-babel
 | 
				
			||||||
 | 
					      - python3-bs4
 | 
				
			||||||
      - python3-django
 | 
					      - python3-django
 | 
				
			||||||
      - python3-django-cas-server
 | 
					      - python3-django-cas-server
 | 
				
			||||||
      - python3-django-crispy-forms
 | 
					      - python3-django-crispy-forms
 | 
				
			||||||
@@ -32,12 +34,13 @@
 | 
				
			|||||||
      - python3-pil
 | 
					      - python3-pil
 | 
				
			||||||
      - python3-pip
 | 
					      - python3-pip
 | 
				
			||||||
      - python3-psycopg2
 | 
					      - python3-psycopg2
 | 
				
			||||||
 | 
					      - python3-setuptools
 | 
				
			||||||
      - python3-venv
 | 
					      - python3-venv
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # LaTeX (PDF generation)
 | 
					      # LaTeX (PDF generation)
 | 
				
			||||||
      - texlive-fonts-extra
 | 
					      - texlive-fonts-recommended
 | 
				
			||||||
      - texlive-lang-french
 | 
					      - texlive-lang-french
 | 
				
			||||||
      - texlive-latex-extra
 | 
					      - texlive-latex-base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # WSGI server
 | 
					      # WSGI server
 | 
				
			||||||
      - uwsgi
 | 
					      - uwsgi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,8 +6,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
\usepackage[margin=1.5cm]{geometry}
 | 
					\usepackage[margin=1.5cm]{geometry}
 | 
				
			||||||
\usepackage{lmodern}
 | 
					\usepackage{lmodern}
 | 
				
			||||||
\usepackage{ltablex}
 | 
					 | 
				
			||||||
\usepackage{tabularx}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
\begin{document}
 | 
					\begin{document}
 | 
				
			||||||
\begin{center}
 | 
					\begin{center}
 | 
				
			||||||
@@ -25,7 +23,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
\begin{center}
 | 
					\begin{center}
 | 
				
			||||||
\footnotesize
 | 
					\footnotesize
 | 
				
			||||||
\begin{tabularx}{\textwidth}{ccccccccc}
 | 
					\begin{tabular}{ccccccccc}
 | 
				
			||||||
\textbf{Nom} & \textbf{Prénom} & \textbf{Date de naissance} & \textbf{Genre} & \textbf{Section}
 | 
					\textbf{Nom} & \textbf{Prénom} & \textbf{Date de naissance} & \textbf{Genre} & \textbf{Section}
 | 
				
			||||||
 & \textbf{Bus} & \textbf{Équipe} & \textbf{Rôles} \\
 | 
					 & \textbf{Bus} & \textbf{Équipe} & \textbf{Rôles} \\
 | 
				
			||||||
{% for membership in memberships %}
 | 
					{% for membership in memberships %}
 | 
				
			||||||
@@ -33,7 +31,7 @@
 | 
				
			|||||||
& {{ membership.registration.get_gender_display|safe }} & {{ membership.user.profile.section_generated|safe }} & {{ membership.bus.name|safe }}
 | 
					& {{ membership.registration.get_gender_display|safe }} & {{ membership.user.profile.section_generated|safe }} & {{ membership.bus.name|safe }}
 | 
				
			||||||
& {% if membership.team %}{{ membership.team.name|safe }}{% else %}--{% endif %} & {{ membership.roles.first|safe }} \\
 | 
					& {% if membership.team %}{{ membership.team.name|safe }}{% else %}--{% endif %} & {{ membership.roles.first|safe }} \\
 | 
				
			||||||
{% endfor %}
 | 
					{% endfor %}
 | 
				
			||||||
\end{tabularx}
 | 
					\end{tabular}
 | 
				
			||||||
\end{center}
 | 
					\end{center}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
\footnotesize
 | 
					\footnotesize
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user