owrt_build_script/Jenkinsfile
psycho ee09ec5c49 testing_16
16
2020-08-13 15:57:21 +02:00

80 lines
1.7 KiB
Groovy

def debug = false
def stageName = ''
def git_link
def config_link = 'https://git.psychobox.org/psycho/owrt_build_script.git'
def config_path = 'configs/'
def patch_path = 'patches/'
def script_folder = 'owrt_build_script'
def git_folder = 'openwrt'
def patch = '16M.patch'
if(params.DEBUG)
{
debug = true
}
if(params.GIT)
{
git_link = params.GIT
}
if(params.CFG_PATH)
{
config_path = params.CFG_PATH
}
if(params.PATCH)
{
patch = params.PATCH
}
def printDebug(msg)
{
println 'DEBUG: ' + msg
}
node('test')
{
stageName = 'checkout'
stage(stageName)
{
cleanWs()
sh label: 'checkout_configs', script: 'git clone ' + config_link + ' ' + script_folder
sh label: 'checkout_openwrt', script: 'git clone ' + git_link + ' ' + git_folder
}
stageName = 'pre-build'
stage(stageName)
{
sh label: 'uiae', script: 'ls -al'
sh label: 'patch_sources', script: 'cd ' + git_folder + '; patch -p1 < ../' + script_folder + '/' + patch_path + patch
sh label: 'feeds_update', script: 'cd ' + git_folder + '; ./scripts/feeds update -a'
sh label: 'feeds_install', script: 'cd ' + git_folder + '; ./scripts/feeds install -a'
}
stageName = 'build'
stage(stageName)
{
//step
//{
sh label: 'copy_config', script: 'cp ' + script_folder + '/' + config_path + 'tl_wr841_v11_config ' + git_folder + '/.config'
sh label: 'build_v11', script: 'cd ' + git_folder + '; make oldconfig; make -j13 V=s'
//}
//step
//{
sh label: 'copy_config', script: 'cp ' + script_folder + '/' + config_path + 'tl_wr841_v12_config ' + git_folder + '/.config'
sh label: 'build_v12', script: 'cd ' + git_folder + '; make oldconfig; make -j13 V=s'
//}
}
stageName = 'clean'
stage(stageName)
{
//cleanWs()
}
}