Declarative pipeline.

This commit is contained in:
Robert Jacob 2017-07-08 19:18:07 +02:00
parent 8983749988
commit 3d0d4d8734
1 changed files with 63 additions and 44 deletions

23
Jenkinsfile vendored
View File

@ -1,9 +1,14 @@
node ("make") {
pipeline {
agent any
stages {
stage('checkout tools') {
steps {
checkout scm
}
}
stage('checkout') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: 'v17.01.2']],
@ -29,23 +34,37 @@ node ("make") {
]
])
}
}
dir("source") {
stage('feeds') {
steps {
dir("source") {
sh "./scripts/feeds update -a"
sh "./scripts/feeds install -a"
}
}
}
stage('patches') {
steps {
dir("source") {
sh "cp -rf firmware/files firmware/package ."
sh 'for file in firmware/patches/lede/*.patch; do patch -p1 < $file; done'
dir('feeds/routing') {
sh 'for file in ../../firmware/patches/routing/*.patch; do patch -p1 < $file; done'
}
}
}
}
stage('build') {
steps {
dir("source") {
sh "../build.sh"
}
}
}
}
}