new parameters for debug
added parameter to verbose output of make added parameter to set to single core build
This commit is contained in:
parent
b26ef09a89
commit
5658e69b97
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -19,6 +19,10 @@ def deleteUnbuild = true
|
|||||||
def pre_clean = true
|
def pre_clean = true
|
||||||
def post_clean = false
|
def post_clean = false
|
||||||
def bin_path = 'bin'
|
def bin_path = 'bin'
|
||||||
|
def verbose = false
|
||||||
|
def single_core = false
|
||||||
|
def verbose_str = ''
|
||||||
|
def core_count_str = '$((`nproc` + 1))'
|
||||||
|
|
||||||
|
|
||||||
if(params.DEBUG)
|
if(params.DEBUG)
|
||||||
@ -61,6 +65,14 @@ if(params.BIN_PATH)
|
|||||||
{
|
{
|
||||||
bin_path = params.BIN_PATH
|
bin_path = params.BIN_PATH
|
||||||
}
|
}
|
||||||
|
if(params.VERBOSE)
|
||||||
|
{
|
||||||
|
verbose = params.VERBOSE
|
||||||
|
}
|
||||||
|
if(params.SINGLE_CORE)
|
||||||
|
{
|
||||||
|
single_core = params.SINGLE_CORE
|
||||||
|
}
|
||||||
|
|
||||||
def printDebug(msg)
|
def printDebug(msg)
|
||||||
{
|
{
|
||||||
@ -70,6 +82,14 @@ def printDebug(msg)
|
|||||||
|
|
||||||
printDebug(currentBuild.id.toString())
|
printDebug(currentBuild.id.toString())
|
||||||
printDebug(JOB_NAME)
|
printDebug(JOB_NAME)
|
||||||
|
if(verbose)
|
||||||
|
{
|
||||||
|
verbose_str = ' V=sc'
|
||||||
|
}
|
||||||
|
if(single_core)
|
||||||
|
{
|
||||||
|
core_count_str = '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
node('test')
|
node('test')
|
||||||
@ -103,7 +123,7 @@ node('test')
|
|||||||
stage('build')
|
stage('build')
|
||||||
{
|
{
|
||||||
sh label: 'copy_config', script: 'cp ' + config_path + 'tl_wr841_config ' + git_folder + '/.config'
|
sh label: 'copy_config', script: 'cp ' + config_path + 'tl_wr841_config ' + git_folder + '/.config'
|
||||||
sh label: 'build', script: 'cd ' + git_folder + '; make defconfig; make download; make -j$((`nproc` + 1))'
|
sh label: 'build', script: 'cd ' + git_folder + '; make defconfig; make download; make -j' + core_count_str + verbose_str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user