owrt_build_script/Jenkinsfile
psycho 993d60fd88 testing_08
08
2020-08-11 21:41:17 +02:00

76 lines
1.4 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 = ''
if(params.DEBUG)
{
debug = true
}
if(params.GIT)
{
git_link = params.GIT
}
if(params.CFG_PATH)
{
config_path = params.CFG_PATH
}
def printDebug(msg)
{
println 'DEBUG: ' + msg
}
node('test')
{
if(debug)
{
printDebug('FFUUCCKK')
}
stageName = 'checkout'
stage(stageName)
{
cleanWs()
sh label: 'checkout_configs', script: 'git clone ' + config_link + ' owrt_build_script'
sh label: 'checkout_openwrt', script: 'git clone ' + git_link + ' openwrt'
}
stageName = 'pre-build'
stage(stageName)
{
sh label: 'uiae', script: 'ls -al'
sh label: 'patch_sources', script: 'cd openwrt; patch -p1 < ../owrt_build_script/patches/16M.patch'
sh label: 'feeds_update', script: 'cd openwrt; ./scripts/feeds update -a'
sh label: 'feeds_install', script: 'cd openwrt; ./scripts/feeds install -a'
}
stageName = 'build'
stage(stageName)
{
step
{
sh label: 'copy_config', script: 'cp owrt_build_script/configs/tl_wr841_v11_config openwrt/.config'
sh label: 'build', script: 'echo v11'
}
step
{
sh label: 'copy_config', script: 'cp owrt_build_script/configs/tl_wr841_v12_config openwrt/.config'
sh label: 'build_v12', script: 'echo v12'
}
}
stageName = 'clean'
stage(stageName)
{
cleanWs()
}
}