2019-09-26 14:12:09 +00:00
|
|
|
pipeline {
|
2019-12-29 14:59:29 +00:00
|
|
|
agent none
|
2019-09-26 22:01:01 +00:00
|
|
|
environment {
|
|
|
|
GLUON_SITEDIR = "contrib/ci/minimal-site"
|
2019-12-29 14:59:16 +00:00
|
|
|
GLUON_TARGET = "x86-64"
|
|
|
|
BUILD_LOG = "1"
|
2019-09-26 22:01:01 +00:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('lint') {
|
2019-12-29 14:59:29 +00:00
|
|
|
parallel {
|
|
|
|
stage('lint-lua') {
|
|
|
|
agent { label 'gluon-docker' }
|
|
|
|
steps {
|
2020-04-07 13:34:40 +00:00
|
|
|
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
2019-12-29 14:59:29 +00:00
|
|
|
sh 'make lint-lua'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('lint-sh') {
|
2020-01-18 18:32:00 +00:00
|
|
|
agent { label 'gluon-docker-v1' }
|
2019-12-29 14:59:29 +00:00
|
|
|
steps {
|
2020-04-07 13:34:40 +00:00
|
|
|
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
2019-12-29 14:59:29 +00:00
|
|
|
sh 'make lint-sh'
|
|
|
|
}
|
2019-09-26 22:06:01 +00:00
|
|
|
}
|
2019-09-26 22:01:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('docs') {
|
2019-12-29 14:59:29 +00:00
|
|
|
agent { label 'gluon-docker' }
|
2019-09-26 22:01:01 +00:00
|
|
|
steps {
|
2020-04-07 13:34:40 +00:00
|
|
|
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
2019-09-26 22:01:01 +00:00
|
|
|
sh 'make -C docs html'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('build') {
|
2020-04-15 21:05:57 +00:00
|
|
|
agent { label 'gluon-docker-v2' }
|
2019-09-26 22:01:01 +00:00
|
|
|
steps {
|
2020-04-07 13:34:40 +00:00
|
|
|
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
2019-09-26 22:01:01 +00:00
|
|
|
sh 'make update'
|
2019-12-29 14:59:16 +00:00
|
|
|
sh 'test -d /dl_cache && ln -s /dl_cache openwrt/dl || true'
|
|
|
|
sh 'make -j$(nproc) V=s'
|
2020-03-22 17:49:22 +00:00
|
|
|
stash includes: '**/output/images/factory/*-x86-64.img.gz', name: 'gluon-x86-64-factory'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('test') {
|
|
|
|
agent { label 'gluon-docker-v2' }
|
|
|
|
environment {
|
|
|
|
TMUX = "notmux"
|
|
|
|
}
|
|
|
|
steps {
|
2020-04-07 13:34:40 +00:00
|
|
|
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
2020-03-22 17:49:22 +00:00
|
|
|
unstash 'gluon-x86-64-factory'
|
|
|
|
sh label: 'Unpack image', script: 'gunzip -cd ./output/images/factory/*x86-64*.img.gz > ./image.img'
|
|
|
|
sh label: 'Print python environment', script: 'python3 -m pip freeze'
|
|
|
|
script {
|
|
|
|
for (f in findFiles(glob: '**/tests/*.py')) {
|
|
|
|
sh label: "Test ${f.name}", script: "python3 tests/${f.name} --use-tmp-workdir"
|
|
|
|
}
|
|
|
|
}
|
2019-09-26 22:01:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-26 14:12:09 +00:00
|
|
|
}
|
2020-01-18 18:32:00 +00:00
|
|
|
|
2020-01-18 18:52:50 +00:00
|
|
|
/*
|
|
|
|
api-history:
|
|
|
|
|
|
|
|
Every time the build dependencies of gluon change, the version
|
|
|
|
every container has to be rebuilt. Therefore, we use Jenkins
|
|
|
|
labels which intoduce a version number which is documented here.
|
|
|
|
As soon, as you properly rebuilt your docker container, you
|
|
|
|
can notify lemoer, that you have updated your node.
|
|
|
|
|
2020-04-15 21:05:57 +00:00
|
|
|
- gluon-docker-v1:
|
|
|
|
- add shellcheck binary to the build environment
|
|
|
|
- gluon-docker-v2:
|
|
|
|
- add qemu-testlab testing, requires KVM virtualization support
|
|
|
|
- require rsync dependency to be able to build the next branch
|
2020-01-18 18:52:50 +00:00
|
|
|
*/
|