Commit 5106d047 authored by Fardale's avatar Fardale

serveur d'intégration minimal

parent 02066099
Ce dossier contient les scripts pour une intégration continue à la main.
=== INSTALLATION ===
* mettre en place un cron qui pull le projet à interval régulier.
* Copier post-merge dans .git/hooks.
* Modifier mailci.py pour utiliser un serveur smpt correct.
#!/usr/bin/python3
# Import smtplib for the actual sending function
import smtplib, argparse
# Import the email modules we'll need
from email.mime.text import MIMEText
parser = argparse.ArgumentParser()
parser.add_argument("filename", help="file containing the corp of the mail")
args = parser.parse_args()
with open(args.filename) as fp:
# Create a text/plain message
msg = MIMEText(fp.read())
msg['Subject'] = 'Continuous Integration of the the_dungeon_project : Error'
msg['From'] = 'the_dungeon_project@ci.org'
msg['Reply-To'] = 'ens-info-genielog-2015@lists.crans.org'
msg['To'] = 'ens-info-genielog-2015@lists.crans.org'
# Send the message via our own SMTP server.
s = smtplib.SMTP('smtp.crans.org')
s.send_message(msg)
s.quit()
#!/bin/sh
# Basic verification. No compilation error
make clean
if ! make; then
echo 'Compilation error in the master branch.' > CI/msg
echo 'Result of make :\n' >> CI/msg
make 2>> CI/msg
echo '\n-- \nCI script' >> CI/msg
# Kludge : pas de serveur smtp accessible depuis la salle.
scp CI/msg fardale@acerarien.crans.org:the_dungeon_project/
ssh fardale@acerarien.crans.org './the_dungeon_project/mailci.py ./the_dungeon_project/msg'
rm -f CI/msg
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment