mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-04 22:54:05 +02:00
Compare commits
4 Commits
main
...
d7a537b6b5
Author | SHA1 | Date | |
---|---|---|---|
d7a537b6b5 | |||
0941ee954d | |||
fd11d96d95 | |||
4bfc057454 |
@ -10,50 +10,22 @@ variables:
|
|||||||
# Debian Buster
|
# Debian Buster
|
||||||
py37-django22:
|
py37-django22:
|
||||||
stage: test
|
stage: test
|
||||||
image: debian:buster-backports
|
image: otthorn/nk20_ci_37
|
||||||
before_script:
|
|
||||||
- >
|
|
||||||
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-oauth-toolkit python3-psycopg2 python3-pil
|
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
|
||||||
script: tox -e py37-django22
|
script: tox -e py37-django22
|
||||||
|
|
||||||
# Ubuntu 20.04
|
# Ubuntu 20.04
|
||||||
py38-django22:
|
py38-django22:
|
||||||
stage: test
|
stage: test
|
||||||
image: ubuntu:20.04
|
image: otthorn/nk20_ci_38
|
||||||
before_script:
|
|
||||||
# Fix tzdata prompt
|
|
||||||
- ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
|
|
||||||
- >
|
|
||||||
apt-get update &&
|
|
||||||
apt-get install --no-install-recommends -y
|
|
||||||
python3-django python3-django-crispy-forms
|
|
||||||
python3-django-extensions python3-django-filters python3-django-polymorphic
|
|
||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
|
||||||
script: tox -e py38-django22
|
script: tox -e py38-django22
|
||||||
|
|
||||||
# Debian Bullseye
|
# Debian Bullseye
|
||||||
py39-django22:
|
py39-django22:
|
||||||
stage: test
|
stage: test
|
||||||
image: debian:bullseye
|
image: otthorn/nk20_ci_39
|
||||||
before_script:
|
|
||||||
- >
|
|
||||||
apt-get update &&
|
|
||||||
apt-get install --no-install-recommends -y
|
|
||||||
python3-django python3-django-crispy-forms
|
|
||||||
python3-django-extensions python3-django-filters python3-django-polymorphic
|
|
||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
|
||||||
script: tox -e py39-django22
|
script: tox -e py39-django22
|
||||||
|
|
||||||
|
# Tox linter
|
||||||
linters:
|
linters:
|
||||||
stage: quality-assurance
|
stage: quality-assurance
|
||||||
image: debian:buster-backports
|
image: debian:buster-backports
|
||||||
|
18
docker_ci/Dockerfile.37
Normal file
18
docker_ci/Dockerfile.37
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM debian:buster-backports
|
||||||
|
|
||||||
|
LABEL maintainer="otthorn@crans.org"
|
||||||
|
LABEL description="Debian Buster backports image with django and tox \
|
||||||
|
installed for testing purposes"
|
||||||
|
|
||||||
|
RUN 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-oauth-toolkit \
|
||||||
|
python3-psycopg2 python3-pil \
|
||||||
|
python3-babel python3-lockfile python3-pip python3-phonenumbers \
|
||||||
|
python3-memcache \
|
||||||
|
python3-bs4 python3-setuptools tox texlive-xetex \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
22
docker_ci/Dockerfile.38
Normal file
22
docker_ci/Dockerfile.38
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
LABEL maintainer="otthorn@crans.org"
|
||||||
|
LABEL description="Ubuntu 20.04 image with django and tox \
|
||||||
|
installed for testing purposes"
|
||||||
|
|
||||||
|
# fix tzdata prompt
|
||||||
|
RUN ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
python3-django python3-django-crispy-forms \
|
||||||
|
python3-django-extensions python3-django-filters \
|
||||||
|
python3-django-polymorphic \
|
||||||
|
python3-djangorestframework python3-django-oauth-toolkit \
|
||||||
|
python3-psycopg2 python3-pil \
|
||||||
|
python3-babel python3-lockfile python3-pip python3-phonenumbers \
|
||||||
|
python3-memcache \
|
||||||
|
python3-bs4 python3-setuptools tox texlive-xetex \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
18
docker_ci/Dockerfile.39
Normal file
18
docker_ci/Dockerfile.39
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM debian:bullseye
|
||||||
|
|
||||||
|
LABEL maintainer="otthorn@crans.org"
|
||||||
|
LABEL description="Debian Bulleye image with django and tox \
|
||||||
|
installed for testing purposes"
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
python3-django python3-django-crispy-forms \
|
||||||
|
python3-django-extensions python3-django-filters \
|
||||||
|
python3-django-polymorphic \
|
||||||
|
python3-djangorestframework python3-django-oauth-toolkit \
|
||||||
|
python3-psycopg2 python3-pil \
|
||||||
|
python3-babel python3-lockfile python3-pip python3-phonenumbers \
|
||||||
|
python3-memcache \
|
||||||
|
python3-bs4 python3-setuptools tox texlive-xetex \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
21
docker_ci/README.md
Normal file
21
docker_ci/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Docker CI
|
||||||
|
|
||||||
|
Ce dossier contient les images docker à construire pour la CI. L'idée est
|
||||||
|
d'avoir une image pré-construire, au dessus laquel il y a besoin de faire
|
||||||
|
tourner uniquement les commandes qui nous intéresse. Cela permet notamment de
|
||||||
|
réduire drastiquement le temps que nécessite chaque test car seul la dernière
|
||||||
|
couche (layer) de l'image a besoin d'etre éxécuter.
|
||||||
|
|
||||||
|
## Build les images
|
||||||
|
|
||||||
|
Pour build les images il suffit de lancer les commandes suivantes
|
||||||
|
|
||||||
|
```
|
||||||
|
cd docker_ci/
|
||||||
|
docker build -t nk20_ci_37 -f Dockerfile.37 .
|
||||||
|
docker build -t nk20_ci_38 -f Dockerfile.38 .
|
||||||
|
docker build -t nk20_ci_39 -f Dockerfile.39 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Elles sont acutellement build et disponible sur dockerhub
|
||||||
|
https://hub.docker.com/otthorn/nk20_ci_37
|
16
docker_ci/TODO.md
Normal file
16
docker_ci/TODO.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
## TODO
|
||||||
|
- Créer les images
|
||||||
|
- Build les images
|
||||||
|
- Push les images sur la docker registery de mon choix (docker hub
|
||||||
|
probablement)
|
||||||
|
- Tester la CI avec les images pré construite pour voir tout fonctionnne comme
|
||||||
|
avant
|
||||||
|
- Créer une CI pour les images docker elle meme (hadolin)
|
||||||
|
- Créer une CI pour les images docker de la note
|
||||||
|
- Créer une CI pour ansible
|
||||||
|
- Créer la MR
|
||||||
|
- Demande de merge de la MR
|
||||||
|
|
||||||
|
## Optionnel
|
||||||
|
- build automatique des images par la CI
|
||||||
|
- utiliser le gitlab registery local une fois qu'il sera activé
|
Reference in New Issue
Block a user