pipeline { agent { kubernetes agentsetup(containers: 'go-1-23-2,docker,kaniko' ) } options { disableConcurrentBuilds() buildDiscarder(logRotator( numToKeepStr: '5', // Number of build records to keep artifactNumToKeepStr: '3', // Number of builds for which to keep artifacts daysToKeepStr: '30', // Days to keep builds artifactDaysToKeepStr: '15' // Days to keep artifacts )) } environment { REGISTRY = "lodge.wamblee.org" IMAGE_NAME = "converge" IMAGE_TAG = "${BUILD_NUMBER}" } stages { stage('Build') { steps { sh """ export pwd ls -l make tools make build """ } } stage('Unit test') { steps { sh """ make test """ } } stage('Build images') { steps { build_container_image(dockerfile: "Dockerfile.prod", image: env.IMAGE_NAME, tag: [env.IMAGE_TAG, "${env.BRANCH_NAME}-latest"]) build_container_image(dockerfile: "Dockerfile.test", image: "${env.IMAGE_NAME}-test", tag: [env.IMAGE_TAG, "${env.BRANCH_NAME}-latest"]) } } stage('Integration test') { steps { sh """ make integrationtest """ } } } post { always { junit(testResults: 'testout/junit/**/*.xml', keepLongStdio: true) junit(testResults: 'testout/integrationtest/**/*.xml', keepLongStdio: true) } } }