mirror of
https://github.com/mudita/MuditaOS.git
synced 2025-12-23 22:17:57 -05:00
* Added PR build stage for BellHybridPro. * Changed naming of update and flash packages for Pro config.
129 lines
3.4 KiB
Groovy
129 lines
3.4 KiB
Groovy
@Library('PureCI') _
|
|
|
|
pipeline {
|
|
agent {
|
|
node {
|
|
label 'jenkins-slave-ccache-ram'
|
|
customWorkspace "/home/jenkins/workspace/MuditaOS"
|
|
}
|
|
}
|
|
options{
|
|
ansiColor('xterm')
|
|
parallelsAlwaysFailFast()
|
|
}
|
|
environment {
|
|
JOBS=30
|
|
REPO_WORKSPACE="/home/jenkins/workspace/MuditaOS"
|
|
}
|
|
|
|
stages {
|
|
stage('Check for previous running builds') {
|
|
steps {
|
|
script {
|
|
common.setBuildStatus(env.GIT_COMMIT,"This commit is being built", "PENDING")
|
|
common.cancelPreviousBuilds()
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Initial checks') {
|
|
when {
|
|
changeRequest()
|
|
}
|
|
environment {
|
|
GITHUB_BASE_REF="${pullRequest.base}"
|
|
GITHUB_HEAD_REF="${pullRequest.headRef}"
|
|
}
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.performChecks("false");
|
|
}
|
|
}
|
|
}
|
|
stage('Build RT1051 - PurePhone') {
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.build("rt1051","PurePhone","Release")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build RT1051 - BellHybrid') {
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.build("rt1051","BellHybrid","Release")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build RT1051 - BellHybridPro') {
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.build("rt1051","BellHybrid","Release","-DENABLE_VERSION_PRO=1")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build Linux - PurePhone') {
|
|
when {
|
|
expression {
|
|
return !(env.CHANGE_TARGET ==~ /release\/[0-9]+\.[0-9]+\.[0-9]+-bell/)
|
|
}
|
|
}
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.build("linux","PurePhone","Debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Build Linux - BellHybrid') {
|
|
when {
|
|
expression {
|
|
return !(env.CHANGE_TARGET ==~ /release\/[0-9]+\.[0-9]+\.[0-9]+-pure/)
|
|
}
|
|
}
|
|
steps {
|
|
script{
|
|
common.checkIfBranchIsRebased("false")
|
|
buildSteps.build("linux","BellHybrid","Debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('master-jobs') {
|
|
when {
|
|
branch 'master'
|
|
}
|
|
steps {
|
|
echo "run some tests"
|
|
sh '''#!/bin/bash
|
|
echo "HAL 9000 sleeps here."
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
script{
|
|
common.setBuildStatus(env.GIT_COMMIT,"Build succeeded", "SUCCESS");
|
|
}
|
|
}
|
|
failure {
|
|
script{
|
|
common.setBuildStatus(env.GIT_COMMIT,"Build failed: $env.currentStep", "FAILURE");
|
|
}
|
|
}
|
|
cleanup {
|
|
script{
|
|
common.cleanup("false")
|
|
}
|
|
}
|
|
}
|
|
}
|