Commit e0ca8186 authored by Pere Mato Vila's avatar Pere Mato Vila Committed by Andre Sailer
Browse files

Merge branch 'SPI-1891' into 'LCG_100-patches'

Add RPM revision as parameter in Jenkins

(cherry picked from commit d7835e50)

cbfeeb1a Add RPM revision as parameter
127522ef Typo
7d65acc5 Force the fail the pipeline is build fails for release
parent ccdb4245
Pipeline #2631894 passed with stage
in 15 minutes and 21 seconds
......@@ -69,7 +69,8 @@ def install_tarfile(urltarfile, prefix, lcgprefix, with_hash=True, with_link=Tru
if os.path.exists(postinstall) :
#---Replace the old post-install script with new one
with open(postinstall) as f:
if '#!/bin/sh' in
script =
if '#!/bin/sh' in script or 'RPM_INSTALL_PREFIX' not in script:
shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)),''), postinstall)
os.environ['INSTALLDIR'] = prefix
......@@ -39,6 +39,7 @@ pipeline {
choice(name: 'RPM_DRYRUN', choices: ['no', 'yes'], description: 'RPMs publish dryrun')
booleanParam(name: 'RPM_TEST', defaultValue: false, description: 'RPMs tests')
string(name: 'RPM_REPOSITORY', defaultValue: '', description: 'RPM repository e.g /eos/project/l/lcg/www/lcgpackages/lcg/repo/7/LCG_97/ or empty')
string(name: 'RPM_REVISION_NUMBER', defaultValue: '', description: 'RPM revision number (default is the LCG numeric version)')
options {
......@@ -24,6 +24,11 @@ def buildPackages() {
ctest -VV -DCTEST_LABELS=Release -S lcgcmake/jenkins/lcgcmake-build.cmake
//---Fail the release if the build stage fails-------------------------------------------------------------------------
if ( params.BUILDMODE == 'release' && currentBuild.result == 'UNSTABLE') {
echo 'Setting the build state to FAILURE for BUILDMODE equal to release'
currentBuild.result = 'FAILURE'
//---Update a number of variables after the build step-----------------------------------------------------------------
PLATFORM = sh(returnStdout: true, script: 'lcgcmake/jenkins/').trim()
barePLATFORM = ([PLATFORM.split('-')[0].split('\\+')[0]]+PLATFORM.split('-')[1..3]).join('-').replace('gcc7','gcc8').replace('dbg','opt')
......@@ -183,6 +188,7 @@ def testPythonImport() {
def createRPMS() {
sh label: 'create-rpms', script: """
cd ${WORKSPACE}/install
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment