Skip to content

Commit

Permalink
[Build] Build commits from releng-bot if natives build is enforced
Browse files Browse the repository at this point in the history
And add a not to the description of 'forceNativeBuilds' parameter that
if enabled and 'skipCommit' is not set, the then build binaries will be
pushed to the master branch.
  • Loading branch information
HannesWell authored and akurtakov committed Dec 1, 2023
1 parent 8fc934f commit 2d373d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pipeline {
PR_VALIDATION_BUILD = "true"
}
parameters {
booleanParam(name: 'forceNativeBuilds', defaultValue: false, description: 'Forces to run the native builds of swt\'s binaries. Useful in debugging.')
booleanParam(name: 'forceNativeBuilds', defaultValue: false, description: 'Forces to run the native builds of swt\'s binaries. Will push the built binaries to the master branch, unless \'skipCommit\' is set. Useful in debugging.')
booleanParam(name: 'skipCommit', defaultValue: false, description: 'Stops committing to swt and swt binaries repo at the end. Useful in debugging.')
}
stages {
Expand All @@ -64,7 +64,7 @@ pipeline {
script {
def authorMail = sh(script: 'git log -1 --pretty=format:"%ce" HEAD', returnStdout: true)
echo 'HEAD commit author: ' + authorMail
if ('[email protected]'.equals(authorMail)) {
if ('[email protected]'.equals(authorMail) && !params.forceNativeBuilds) {
// Prevent endless build-loops due to self triggering because of a previous automated build of SWT-natives and the associated updates.
currentBuild.result = 'ABORTED'
error('Abort build only triggered by automated SWT-natives update.')
Expand Down

0 comments on commit 2d373d0

Please sign in to comment.