pipeline { agent any stages { stage("Build on Linux") { agent { label 'linux' } steps { sh ''' #!/bin/bash ./compile.sh ''' } post { always { archiveArtifacts artifacts: "dart/out/*", fingerprint: true archiveArtifacts artifacts: "cpp/build/vsleep", fingerprint: true archiveArtifacts artifacts: "cpp/build/pause", fingerprint: true deleteDir() } } } stage("Build on Windows") { agent { label 'windows' } steps { bat ''' @echo off git clean -xfd git reset --hard mkdir cpp\\build cd cpp\\build cmake .. make cd ..\\.. cd dart mkdir out dart compile exe -o out\\dbikc.exe bin\\dbikc.dart dart compile exe -o out\\uuidgen.exe bin\\uuidgen.dart cd .. ''' } post { always { archiveArtifacts artifacts: "dart\\out\\*.exe", fingerprint: true archiveArtifacts artifacts: "cpp\\build\\vsleep.exe", fingerprint: true archiveArtifacts artifacts: "cpp\\build\\pause.exe", fingerprint: true deleteDir() } } } } }