pipeline { agent { kubernetes { cloud 'rsys-devel' defaultContainer 'homebrew' inheritFrom 'homebrew' } } environment { DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = "1" // TODO Should probably remove this } stages { stage("Install") { steps { sh 'brew install dotnet@8 node zip' sh 'npm install --prefix ./Props' } } stage("Test Props.Shop") { steps { sh returnStatus: true, script: 'dotnet test --logger xunit Props.Shop/**/*.Tests.csproj' xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)]) } } stage("Publish Props.Shop") { steps { sh '''#!/bin/bash for file in Props.Shop/**/*.csproj do dotnet publish --configuration Release --output output/shop-modules $file done ''' fingerprint 'output/shop-modules/**/Props.Shop.*' sh 'mkdir -p ./Props/shops/' sh 'cp ./output/shop-modules/*.dll ./output/shop-modules/*.deps.json ./Props/shops/.' } } stage("Test Props") { steps { sh returnStatus: true, script: 'dotnet test --logger xunit Props.Tests/Props.Tests.csproj' xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)]) } } stage("Publish Props") { steps { sh 'dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props' sh 'dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props' fingerprint 'output/props/**/Props*' sh 'tar -czf output/props-linux-x64.tar.gz output/props/props-linux-x64' sh 'zip -r output/props-win-x64.zip output/props/props-win-x64' archiveArtifacts artifacts: 'output/*.tar.gz,output/*.zip', followSymlinks: false } } } }