rebuilt script structure#2

rebuilt script structure#2
This commit is contained in:
psycho 2020-11-09 14:51:33 +01:00
parent b2f83de4f6
commit 54ffeb1172

41
Jenkinsfile vendored
View File

@ -83,14 +83,6 @@ def printDebug(msg)
printDebug(currentBuild.id.toString())
printDebug(JOB_NAME)
if(verbose)
{
verbose_str = ' V=sc'
}
if(single_core)
{
core_count_str = '1'
}
node('test')
@ -114,10 +106,11 @@ node('test')
post_build()
}
}
def checkout()
{
def checkout()
{
stage('checkout')
{
if(pre_clean)
@ -132,20 +125,20 @@ node('test')
isBuildNeeded = true
}
}
}
}
def pre_build()
{
def pre_build()
{
stage('pre-build')
{
sh label: 'patch_sources', script: 'cd ' + git_folder + '; patch -p1 < ../' + 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'
}
}
}
def build()
{
def build()
{
stage('build')
{
sh label: 'copy_config', script: 'cp ' + config_path + 'tl_wr841_config ' + git_folder + '/.config'
@ -169,10 +162,10 @@ node('test')
{
sh label: 'copy_binaries', script: 'python ' + scripts_path + 'sftp_test.py -a ' + sftp_host + ' -u ' + sftp_user + ' -p ' + params.SFTP_PASSWD + ' -g ' + git_folder + ' -f ' + scripts_path + known_hosts + ' -l ' + sftp_path + ' -c ' + bin_path
}
}
}
def post_build()
{
def post_build()
{
if(post_clean)
{
cleanWs()
@ -193,6 +186,12 @@ node('test')
//printDebug('NUMBER_after:' + job.nextBuildNumber)
job.save()
}
}
}
def notify()
{
def body_text = "${JOB_NAME} - Build # ${BUILD_NUMBER} - ${currentBuild.currentResult}:<br>Check console output at ${BUILD_URL} to view the results."
def subject_text = "${JOB_NAME} - Build # ${BUILD_NUMBER} - ${currentBuild.currentResult}!"
emailext body: body_text, subject: subject_text, to: 'psychowoife@gmail.com'
}