Skip to content
Snippets Groups Projects
Select Git revision
  • c90d6b98a86f007ba4ea87168f85d1cb01d22e1a
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-08-13
  • experimental-2025-08-13-base
  • experimental-2025-08-04
  • experimental-2025-08-04-base
  • experimental-2025-07-31
  • experimental-2025-07-31-base
  • experimental-2025-07-29
  • experimental-2025-07-29-base
  • experimental-2025-07-28
  • experimental-2025-07-28-base
  • experimental-2025-07-26
  • experimental-2025-07-26-base
  • experimental-2025-07-24
  • experimental-2025-07-24-base
  • experimental-2025-07-22
  • experimental-2025-07-22-base
  • experimental-2025-07-21
  • experimental-2025-07-21-base
  • experimental-2025-07-20
  • experimental-2025-07-20-base
41 results

Jenkinsfile

Blame
  • Jenkinsfile 2.26 KiB
    pipeline {
    	agent none
    	environment {
    		GLUON_SITEDIR = "contrib/ci/minimal-site"
    		GLUON_TARGET = "x86-64"
    		BUILD_LOG = "1"
    	}
    	stages {
    		stage('lint') {
    			parallel {
    				stage('lint-lua') {
    					agent { label 'gluon-docker' }
    					steps {
    						sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
    						sh 'make lint-lua'
    					}
    				}
    				stage('lint-sh') {
    					agent { label 'gluon-docker-v1' }
    					steps {
    						sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
    						sh 'make lint-sh'
    					}
    				}
    			}
    		}
    		stage('docs') {
    			agent { label 'gluon-docker' }
    			steps {
    				sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
    				sh 'make -C docs html'
    			}
    		}
    		stage('build') {
    			agent { label 'gluon-docker-v2' }
    			steps {
    				sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
    				sh 'make update'
    				sh 'test -d /dl_cache && ln -s /dl_cache openwrt/dl || true'
    				timeout(time: 2, unit: "HOURS") {
    					sh 'make -j$(nproc) V=s'
    				}
    				stash includes: '**/output/images/factory/*-x86-64.img.gz', name: 'gluon-x86-64-factory'
    			}
    		}
    		stage('test') {
    			agent { label 'gluon-vmx' }
    			steps {
    				sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
    				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')) {
    						timeout(time: 10, unit: "MINUTES") {
    							sh label: "Test ${f.name}", script: "python3 tests/${f.name} --use-tmp-workdir"
    						}
    					}
    				}
    			}
    		}
    	}
    }
    
    /*
     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.
    
     - 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
     - gluon-vmx
       - splits the qemu testing from the gluon-docker-v2 label to accomodate
         nodes without the vmx cpu flag
    */