pipeline { agent { docker { image 'u-boot-builder' args '--network jenkins_network' } } environment { NEXUS_URL = 'http://172.23.0.6:8081/nexus' NEXUS_CREDS = credentials('nexus-credentials') } options { timeout(time: 1, unit: 'HOURS') } stages { stage('Build and Publish'){ matrix { axes { axis { name 'CONFIG' values 'orangepi_pc_plus_defconfig' } } stages { stage('Make config') { steps { sh 'make ${CONFIG}' } } stage('Build') { steps { sh 'make CROSS_COMPILE=arm-linux-gnueabi- -j$(nproc)' } } stage('Upload to nexus'){ steps { sh 'echo $NEXUS_CREDS' sh 'curl -u "$NEXUS_CREDS" --upload-file u-boot.bin "$NEXUS_URL/repository/u-boot/builds/${BUILD_NUMBER}/u-boot.bin"' sh 'curl -u "$NEXUS_CREDS" --upload-file u-boot-sunxi-with-spl.bin "$NEXUS_URL/repository/u-boot/builds/${BUILD_NUMBER}/u-boot-sunxi-with-spl.bin"' } } } } } } post { always { cleanWs() } } }