fltk: update to 1.3.10
[oi-userland.git] / ci / user-build.groovy
blobca471fd6155e25376ca2c168bc61f6f16ddbf944
1 import jenkins.model.Jenkins
3 @Library("BuildLib") _
5 /**
6 * Gets the commit hash from a Jenkins build object, if any
7 */
8 @NonCPS
9 def commitHashForBuild( build ) {
10 def scmAction = build?.actions.find { action -> action instanceof jenkins.scm.api.SCMRevisionAction }
11 return scmAction?.revision?.hash
14 @NonCPS
15 String getChangedFilesList() {
16 changedFiles = []
17 for (changeLogSet in currentBuild.changeSets) {
18 for (entry in changeLogSet.getItems()) { // for each commit in the detected changes
19 for (file in entry.getAffectedFiles()) {
20 changedFiles.add(file.getPath()) // add changed file to list
24 return changedFiles
27 pipeline {
28 agent {
29 node {
30 label 'userland'
33 stages {
34 stage('Ensure is ready to build') {
35 steps {
36 sh 'pfexec /usr/sbin/mountall -F nfs || exit 0'
39 stage('Git Checkout') {
40 steps {
41 withSharedWs() {
42 git branch: 'oi/hipster', url: 'https://github.com/OpenIndiana/oi-userland.git'
46 stage('Gmake Setup') {
47 steps {
48 sh 'rm -f components/components.mk'
49 sh 'rm -f components/depends.mk'
50 withPublisher('openindiana.org', 'incremental') {
51 sh 'gmake setup'
55 stage('Gmake Publish') {
56 steps {
57 withPublisher('openindiana.org', 'incremental') {
58 script {
59 writeFile file: 'changed_files.txt', text: getChangedFilesList().join("\n")
61 sh './tools/jenkinshelper-main.ksh -s build_changed'
65 stage('update system') {
66 steps {
67 update()
68 sh '/opt/local/bin/cleanup_bootenvs.sh'