added continuous integration to cocluto

work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3093]
This commit is contained in:
Guillaume Raffy 2026-04-02 18:09:17 +02:00
parent 0f0d5f800e
commit 7acaa1ad5a
1 changed files with 59 additions and 0 deletions

59
ci/ipr.jenkins Normal file
View File

@ -0,0 +1,59 @@
// Jenkinsfile for jenkins.ipr.univ-rennes1.fr (Institut de Physique de Rennes)
pipeline {
agent {label 'alambix_agent'}
environment {
VENV_PATH = "${WORKSPACE}/cocluto.venv"
}
stages {
stage('setup') {
steps {
echo 'setting up itinv test environment'
sh """#!/bin/bash
python3 -m venv ${VENV_PATH} &&
source ${VENV_PATH}/bin/activate &&
pip install --upgrade pip &&
pip install --upgrade setuptools &&
pip install .
"""
}
}
stage('testing cocluto (cluster tools)') {
steps {
sh """#!/bin/bash
set -o errexit
source ${VENV_PATH}/bin/activate &&
python3 -m unittest test.test_cocluto
"""
}
}
stage('testing simpadb') {
steps {
sh """#!/bin/bash
set -o errexit
source ${VENV_PATH}/bin/activate &&
python3 -m unittest test.test_simpadb
"""
}
}
stage('testing quman') {
steps {
sh """#!/bin/bash
set -o errexit
source ${VENV_PATH}/bin/activate &&
python3 -m unittest test.test_quman
"""
}
}
}
post
{
// always, success, failure, unstable, changed
failure
{
mail bcc: '', body: "<b>Jenkins build failed</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br>Build URL: ${env.BUILD_URL}", cc: 'guillaume.raffy@univ-rennes.fr, julien.dasilva@univ-rennes.fr', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "CI build failed for ${env.JOB_NAME}", to: "info-ipr@univ-rennes1.fr";
}
cleanup {
cleanWs()
}
}
}