eole-gitea/dicos/50_gitea.xml

130 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='gitea-nginx' name='/etc/nginx/sites-available/gitea' source='gitea.nginx' mkdir='True' rm='True'/>
<file filelist='gitea' name='/usr/share/eole/bastion/data/51-gitea-nat_rules' mkdir='True' rm='True' mode='0755'/>
<file filelist='gitea' name='/etc/eole/eole-db.d/gitea-db.yml' rm='True' mkdir='True'/>
<file filelist='gitea' name='/usr/share/eole/db/gitea/gen/00-create-gitea-db.sql' mkdir='True' rm='True'/>
<service_access service='gitea_with_nginx'>
<port service_accesslist="gitea_with_nginx">443</port>
</service_access>
</files>
<containers>
<container name='forge' id='101'>
<package>apt-transport-https</package>
<package>git</package>
<file filelist='gitea' name='/etc/gitea/conf/app.ini' source='gitea.conf' mkdir='True' rm='True' mode='770' owner='root' group='gitservice'/>
<service servicelist='gitea'>forge</service>
<service_access service='gitea_without_nginx'>
<port service_accesslist="gitea_without_nginx" port_type="SymLinkOption">gitea_http_port</port>
</service_access>
<service_access service='gitea_ssh'>
<port service_accesslist="gitea_ssh'" port_type="SymLinkOption">gitea_ssh_port</port>
</service_access>
</container>
</containers>
<variables>
<family name='services'>
<variable name='activer_gitea' type='oui/non' description='Activer la forge Gitea'>
<value>non</value>
</variable>
</family>
<family name='forge'>
<variable name='gitea_name' type='string' description='Nom de la forge' mandatory='True'>
<value>Forge Numérique EOLE</value>
</variable>
<variable name='gitea_mail' type='oui/non' description="Activer l'envois de courriels">
<value>non</value>
</variable>
<variable name='gitea_mail_from' type='string' description="Adresse courriel a l'origine des messages de la forge"/>
<variable name='gitea_mail_auth' type='oui/non' description="Utiliser un compte pour le serveur smtp">
<value>non</value>
</variable>
<variable name='gitea_email_user' type='string' description="Nom de l'utilisateur SMTP"/>
<variable name='gitea_email_password' type='string' description="Mot de passe de l'utilisateur"/>
<variable name='gitea_web_name' type='string' description='Nom DNS de la forge' mandatory='True'/>
<variable name='git_root' type='string' description='Repertoire des dépôts git' mandatory='True'>
<value>/srv/forge/git</value>
</variable>
<variable name='gitea_registration' type='oui/non' description="Les utilisateurs peuvent s'enregistrer">
<value>non</value>
</variable>
<variable name='gitea_http_port' type='string' description='Port HTTP pour la forge' mode='expert'>
<value>6000</value>
</variable>
<variable name='gitea_ssh_port' type='string' description='Port SSH pour la forge' mode='expert'>
<value>2222</value>
</variable>
<variable name='gitea_db_file' type='string' description='Fichier de base de données' mode='expert'>
<value>/var/db/gitea/gitea.db</value>
</variable>
<variable name='gitea_domain' type='string' description='Domaine git ... fixme ...' mode='expert'>
<value>localhost</value>
</variable>
<variable name='gitea_nginx' type='oui/non' hidden='True'/>
<variable type='string' name='gitea_db_mode' description='Serveur de bases de données à utiliser'/>
</family>
<family name="BDD Forge" mode="expert">
<variable type='string' name='gitea_dbserver' description='Adresse du serveur de base de données'/>
<variable type='number' name='gitea_dbport' description="Port d'écoute du serveur de base de données"/>
<variable type='string' name='gitea_allow_hosts' description="Hôtes authorisés à utiliser la base de données" multi='True'/>
<variable type='string' name='gitea_dbuser' description='Utilisateur du serveur de base de données'/>
<variable type='string' name='gitea_dbpass' description='Fichier de mot de passe du serveur'/>
</family>
</variables>
<constraints>
<condition name='hidden_if_in' source='gitea_mail'>
<param>non</param>
<target type='variable'>gitea_mail_from</target>
</condition>
<condition name='disabled_if_in' source='activer_gitea'>
<param>non</param>
<target type='filelist'>gitea</target>
<target type='filelist'>gitea-nginx</target>
<target type='servicelist'>gitea</target>
<target type='family'>forge</target>
<target type='service_accesslist'>gitea_ssh</target>
</condition>
<condition name='disabled_if_in' source='gitea_mail_auth'>
<param>non</param>
<target type='variable'>gitea_email_user</target>
<target type='variable'>gitea_email_password</target>
</condition>
<fill name='calc_multi_condition' target='gitea_nginx'>
<param>oui</param>
<param name="operator">OR</param>
<param type="eole" name="condition_1" optional="True">activer_nginx_web</param>
<param name="condition_2">non</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
</fill>
<condition name='disabled_if_in' source='gitea_nginx'>
<param>non</param>
<target type='filelist'>gitea-nginx</target>
<target type='service_accesslist'>gitea_with_nginx</target>
</condition>
<condition name='disabled_if_in' source='gitea_nginx'>
<param>oui</param>
<target type='service_accesslist'>gitea_without_nginx</target>
</condition>
<check name='valid_enum' target='gitea_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
<condition name='disabled_if_in' source='gitea_db_mode'>
<param>local</param>
<target type='family'>BDD Forge</target>
</condition>
<condition name='disabled_if_in' source='gitea_db_mode'>
<param>default</param>
<target type='family'>BDD Forge</target>
</condition>
</constraints>
<help>
<variable name='activer_gitea'>Activer la forge Gitea, Gitea est une forge basée sur Git clone de github (fork de gogs)</variable>
</help>
</creole>