Projet

Général

Profil

Télécharger (1,41 ko) Statistiques
| Branche: | Tag: | Révision:

root / Jenkinsfile @ e36384fe

1
@Library('eo-jenkins-lib@main') import eo.Utils
2

    
3
pipeline {
4
    agent any
5
    options { disableConcurrentBuilds() }
6
    stages {
7
        stage('Unit Tests') {
8
            steps {
9
                sh './jenkins.sh'
10
            }
11
            post {
12
                always {
13
                    script {
14
                        utils = new Utils()
15
                        utils.publish_coverage('coverage.xml')
16
                        utils.publish_coverage_native('index.html')
17
                        utils.publish_pylint('pylint.out')
18
                    }
19
                    junit '*_results.xml'
20
                }
21
            }
22
        }
23
        stage('Packaging') {
24
            steps {
25
                script {
26
                    if (env.JOB_NAME == 'auquotidien' && env.GIT_BRANCH == 'origin/main') {
27
                        sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d bullseye auquotidien'
28
                    } else if (env.GIT_BRANCH.startsWith('hotfix/')) {
29
                        sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d bullseye --branch ${env.GIT_BRANCH} --hotfix auquotidien"
30
                    }
31
                }
32
            }
33
        }
34
    }
35
    post {
36
        always {
37
            script {
38
                utils = new Utils()
39
                utils.mail_notify(currentBuild, env, 'ci+jenkins-auquotidien@entrouvert.org')
40
            }
41
        }
42
        success {
43
            cleanWs()
44
        }
45
    }
46
}
(4-4/9)