Marcel Telka
2024-04-05 26ab531a0abac615aaedf17622ee2aa5e19c5114
commit | author | age
f90860 1 // OpenIndiana Userland Jenkinsfile, (c) 2021 Olaf Bohlen <olbohlen@eenfach.de>
2adcba 2 // OpenIndiana Userland Jenkinsfile, (c) 2021 Till Wegmueller <toasterson@gmail.com>
f90860 3
TW 4 // ensure the jenkins user can modify SMF services, e.g. run:
5 // usermod -A solaris.smf.* -P 'Service Operator' jenkins
2adcba 6
TW 7 // To add more things have a look at the documentation under
8 // https://github.com/jenkinsci/pipeline-github-plugin
9
10 // TODO: Do not build draft PR's
11 // TODO: Figure out what to do when no Makefile was changed
12 // TODO: have two build Jobs (one for oi/hipster and another for this PR)
13 // TODO: matrix build against multiple configuration gcc-7, gcc-10, gcc-11 and encumbered vs. without encumbered
f90860 14
TW 15 pipeline {
16     options {
17         // set a timeout of 600 minutes for this pipeline
18         timeout(time: 600, unit: 'MINUTES')
19     }
20     agent {
21       node {
22         label 'buildserver'
23       }
24     }
25     stages {
26         stage('setup stage') {
27             steps {
2adcba 28                 sh './tools/jenkinshelper.ksh -s setup'
f90860 29             }
TW 30         }
31
32         stage('build changed components') {
33             steps {
34                 sh './tools/jenkinshelper.ksh -s build_changed'
35             }
36         }
37
2adcba 38         stage('create initial pkgdepotd.conf if not exists') {
TW 39             steps {
40                 sh './tools/jenkinshelper.ksh -s prepare_pkgdepotd'
41               }
f90860 42         }
2adcba 43
TW 44         stage('cleanup') {
45             when {
2e4d0a 46                 changeRequest()
2adcba 47             }
TW 48             steps {
49                 script {
50                     if (pullRequest.state == "closed" || pullRequest.merged) {
51                         sh './tools/jenkinshelper.ksh -s cleanup_pr'
52                     }
53                 }
54             }
55         }
f90860 56     }
TW 57 }
58