fritzkink
2023-12-27 706019354bab81fc3f01995caf1ae1a2dfa346cf
ci/user-build.groovy
@@ -1,4 +1,16 @@
import jenkins.model.Jenkins
@Library("BuildLib") _
/**
 * Gets the commit hash from a Jenkins build object, if any
 */
@NonCPS
def commitHashForBuild( build ) {
  def scmAction = build?.actions.find { action -> action instanceof jenkins.scm.api.SCMRevisionAction }
  return scmAction?.revision?.hash
}
pipeline {
    agent {
        node {
@@ -30,6 +42,11 @@
        stage('Gmake Publish') {
            steps {
                withPublisher('openindiana.org', 'incremental') {
                    script {
                        def last_build = Jenkins.instance.getItem('OpenIndiana').getItem('Userland').lastSuccessfulBuild
                        def last_commit = commitHashForBuild(last_build)
                    }
                    sh './tools/jenkinshelper-main.ksh -s build_changed'
                }
            }
@@ -42,6 +59,7 @@
        stage('update system') {
            steps {
                update()
                sh '/opt/local/bin/cleanup_bootenvs.sh'
            }
        }
    }