Compare commits
5 Commits
7d80dbb504
...
1d87fb8a6b
Author | SHA1 | Date |
---|---|---|
Emmanuel Cazenave | 1d87fb8a6b | |
Emmanuel Cazenave | fc6364fb7f | |
Thomas NOËL | ff1d4c69c6 | |
Emmanuel Cazenave | 1dda8a9d6c | |
Emmanuel Cazenave | af108cad77 |
|
@ -7,14 +7,14 @@ pipeline {
|
||||||
stage('Unit Tests (bullseye)') {
|
stage('Unit Tests (bullseye)') {
|
||||||
steps {
|
steps {
|
||||||
catchError(stageResult: 'FAILURE') {
|
catchError(stageResult: 'FAILURE') {
|
||||||
sh 'sudo ./test-nspawn bullseye'
|
sh './test-debvm bullseye'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Unit Tests (bookworm)') {
|
stage('Unit Tests (bookworm)') {
|
||||||
steps {
|
steps {
|
||||||
catchError(stageResult: 'FAILURE') {
|
catchError(stageResult: 'FAILURE') {
|
||||||
sh 'sudo ./test-nspawn bookworm'
|
sh './test-debvm bookworm'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
|
|
||||||
INSTALLED_APPS += ('debug_toolbar',)
|
|
||||||
INTERNAL_IPS = ['127.0.0.1']
|
|
|
@ -1,2 +0,0 @@
|
||||||
theme_repo: "publik-base-theme"
|
|
||||||
theme_link: "publik-base"
|
|
|
@ -3,6 +3,7 @@
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- acl
|
- acl
|
||||||
|
- devscripts
|
||||||
- gettext
|
- gettext
|
||||||
- graphicsmagick
|
- graphicsmagick
|
||||||
- graphviz
|
- graphviz
|
||||||
|
@ -261,14 +262,30 @@
|
||||||
- source
|
- source
|
||||||
|
|
||||||
- name: install theme
|
- name: install theme
|
||||||
import_tasks: tasks/install_theme.yml
|
import_tasks: tasks/install_source.yml
|
||||||
vars:
|
vars:
|
||||||
src_theme_dir: "{{src_dir}}/{{theme_repo}}"
|
repo: "publik-base-theme"
|
||||||
|
repo_dir: "{{src_dir}}/publik-base-theme"
|
||||||
|
virtualenv: "{{venv_py3}}"
|
||||||
version: "{{publik_base_theme_version|default('main')}}"
|
version: "{{publik_base_theme_version|default('main')}}"
|
||||||
|
do_build: "{{compile_theme}}"
|
||||||
tags:
|
tags:
|
||||||
- theme
|
- theme
|
||||||
- source
|
- source
|
||||||
|
|
||||||
|
- name: create themes directory
|
||||||
|
file:
|
||||||
|
path: "{{themes_dir}}"
|
||||||
|
state: directory
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: link to theme_repo
|
||||||
|
file:
|
||||||
|
src: "{{src_dir}}/publik-base-theme"
|
||||||
|
path: "{{themes_dir}}/publik-base"
|
||||||
|
state: link
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: create cert directory
|
- name: create cert directory
|
||||||
file:
|
file:
|
||||||
path: "{{certs_dir}}"
|
path: "{{certs_dir}}"
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
}},
|
}},
|
||||||
{"create-wcs": {
|
{"create-wcs": {
|
||||||
"url": "https://{{tenants_conf['demarches-wcs']}}/",
|
"url": "https://{{tenants_conf['demarches-wcs']}}/",
|
||||||
"template_name": "{{wcs_skeleton_filename}}",
|
|
||||||
"title": "Démarches"
|
"title": "Démarches"
|
||||||
}},
|
}},
|
||||||
{% if 'dev-passerelle' in tenants_conf and tenants_conf['dev-passerelle'] %}
|
{% if 'dev-passerelle' in tenants_conf and tenants_conf['dev-passerelle'] %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
cook_recipe_path: /tmp/cook-recipe.json
|
cook_recipe_path: /tmp/cook-recipe.json
|
||||||
wcs_skeleton_filename: publik.zip
|
wcs_skeleton_filename: default.zip
|
||||||
wcs_error_email: ""
|
wcs_error_email: ""
|
||||||
wcs_language: "fr"
|
wcs_language: "fr"
|
||||||
wcs_postgres_user: ""
|
wcs_postgres_user: ""
|
||||||
|
|
|
@ -26,3 +26,4 @@
|
||||||
command: "{{ virtualenv }}/bin/python setup.py build"
|
command: "{{ virtualenv }}/bin/python setup.py build"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ repo_dir }}"
|
chdir: "{{ repo_dir }}"
|
||||||
|
when: do_build | default(true)
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
- name: ssh git clone {{theme_repo}}
|
|
||||||
git:
|
|
||||||
repo: gitea@git.entrouvert.org:entrouvert/{{theme_repo}}.git
|
|
||||||
dest: "{{src_theme_dir}}"
|
|
||||||
version: "{{version}}"
|
|
||||||
when:
|
|
||||||
- git_ssh
|
|
||||||
|
|
||||||
- name: standard git clone {{theme_repo}}
|
|
||||||
git:
|
|
||||||
repo: https://git.entrouvert.org/entrouvert/{{theme_repo}}.git
|
|
||||||
dest: "{{src_theme_dir}}"
|
|
||||||
version: "{{version}}"
|
|
||||||
when:
|
|
||||||
- not git_ssh
|
|
||||||
|
|
||||||
- name: compile theme {{theme_repo}}
|
|
||||||
make:
|
|
||||||
chdir: "{{src_theme_dir}}"
|
|
||||||
target: all
|
|
||||||
when: compile_theme
|
|
||||||
|
|
||||||
- name: create themes directory
|
|
||||||
file:
|
|
||||||
path: "{{themes_dir}}"
|
|
||||||
state: directory
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: link to {{theme_repo}}
|
|
||||||
file:
|
|
||||||
src: "{{src_theme_dir}}"
|
|
||||||
path: "{{themes_dir}}/{{theme_link}}"
|
|
||||||
state: link
|
|
||||||
become: yes
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh -ex
|
||||||
|
# USAGE : ./test-debvm bookworm
|
||||||
|
|
||||||
|
if [ $1 = bullseye ] || [ $1 = bookworm ]
|
||||||
|
then
|
||||||
|
SUITE=$1
|
||||||
|
debvm-create --release=$SUITE --size=10G --sshkey=$HOME/.ssh/id_rsa.pub -- --include=ca-certificates,gnupg2,linux-image-generic,locales-all,postgresql,sudo,git,ansible,make --hook-dir=/usr/share/mmdebstrap/hooks/9pmount
|
||||||
|
debvm-run -g --sshport 2222 -- -daemonize -display none -virtfs "local,path=.,mount_tag=publik-devinst,security_model=none"
|
||||||
|
debvm-waitssh 2222
|
||||||
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 2222 root@localhost "cd /media/publik-devinst;./test-debvm run-tests"
|
||||||
|
kill `ps ax | grep "qemu-system-x86_64" | awk 'NR==1{print $1}'`
|
||||||
|
rm rootfs.ext4
|
||||||
|
elif [ $1 = 'run-tests' ]
|
||||||
|
then
|
||||||
|
adduser --disabled-password --gecos "" testuser
|
||||||
|
usermod -a -G sudo testuser
|
||||||
|
echo 'testuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
PORT=`pg_lsclusters | tail -n1 | awk '{ print $3 }'`
|
||||||
|
su testuser -l -c 'cd /media/publik-devinst; ansible-playbook -e "postgresql_port=$PORT" -i inventory.yml install.yml'
|
||||||
|
fi
|
Loading…
Reference in New Issue