pipeline { agent any options { buildDiscarder( logRotator( numToKeepStr: '3' ) ) } stages { stage("Build on Linux") { agent { label 'flutter' } steps { sh ''' #!/bin/bash ./compile.sh ''' } post { always { archiveArtifacts artifacts: "dart/out/*", fingerprint: true archiveArtifacts artifacts: "cpp/build/vsleep-cpp", fingerprint: true archiveArtifacts artifacts: "cpp/build/pause-cpp", fingerprint: true deleteDir() } } } stage("Build on Windows") { agent { label 'windows' } steps { bat 'compile.bat' archiveArtifacts artifacts: "cpp\\build\\Debug\\vsleep-cpp.exe", fingerprint: true archiveArtifacts artifacts: "cpp\\build\\Debug\\pause-cpp.exe", fingerprint: true archiveArtifacts artifacts: "dart\\out\\*.exe", fingerprint: true } post { always { deleteDir() } } } } }