„Jenkinsfile“ ändern

This commit is contained in:
alex 2021-09-12 17:42:20 +02:00
parent 480b1e2207
commit 53bad41684
1 changed files with 30 additions and 13 deletions

43
Jenkinsfile vendored
View File

@ -1,14 +1,15 @@
script {
script {
NOW= java.time.LocalDateTime.now()
RELEASE="${params.BRANCH}-$NOW"
echo 'Pulling...' + env.BRANCH_NAME
RELEASE="${env.BRANCH_NAME}-${NOW}"
echo "Build release ${RELEASE}"
MAKE_OPTS="GLUON_RELEASE=${RELEASE} GLUON_AUTOUPDATER_BRANCH=${env.BRANCH_NAME} GLUON_AUTOUPDATER_ENABLED=1"
}
int NUM_JOBS = 8
List TARGETS = [
'ath79-generic',
'ath79-nand',
'ath79-nand'/*,
'bcm27xx-bcm2708',
'bcm27xx-bcm2709',
'ipq40xx-generic',
@ -24,9 +25,27 @@ List TARGETS = [
'sunxi-cortexa7',
'x86-64',
'x86-geode',
'x86-generic',
'x86-generic',*/
]
pipeline {
stage ('Build') {
for (arch in TARGETS) {}
node("${arch}-${env.BRANCH_NAME}") {
stage('Build') {
git branch: env.BRANCH_NAME, url: 'https://git.dezentrale.cloud/alex/gluon-firmware.git'
sh 'git submodule update --init --recursive'
sh "make update"
sh "make -j${NUM_JOBS} GLUON_TARGET=${GLUON_TARGET} ${MAKE_OPTS} || make -j1 V=s GLUON_TARGET=${GLUON_TARGET} ${MAKE_OPTS}"
archiveArtifacts artifacts: 'output/**', followSymlinks: false
}
}
}
}
/*pipeline {
agent none
stages {
@ -38,7 +57,7 @@ pipeline {
axis {
name 'GLUON_TARGET'
values 'x86-64'
/*'ath79-generic',
'ath79-generic',
'ath79-nand',
'bcm27xx-bcm2708',
'bcm27xx-bcm2709',
@ -55,17 +74,15 @@ pipeline {
'sunxi-cortexa7',
'x86-64',
'x86-geode',
'x86-generic'*/
'x86-generic'
}
}
stages {
stage("Build") {
steps {
git(branch: "${env.BRANCH_NAME}", url: "https://git.dezentrale.cloud/Freifunk-Leipzig/gluon-firmware.git")
sh 'git submodule update --init --recursive'
// git(branch: "${env.BRANCH_NAME}", url: "https://git.dezentrale.cloud/Freifunk-Leipzig/gluon-firmware.git")
sh "make update"
sh "make -j${params.NUM_JOBS} GLUON_TARGET=${GLUON_TARGET} || make -j1 V=s GLUON_TARGET=${GLUON_TARGET}"
echo "Build ${GLUON_TARGET}"
sh "make -j${NUM_JOBS} GLUON_TARGET=${GLUON_TARGET} ${MAKE_OPTS} || make -j1 V=s GLUON_TARGET=${GLUON_TARGET} ${MAKE_OPTS}"
}
}
}
@ -82,4 +99,4 @@ pipeline {
}
}
}
}
}*/