dotnetresxutils/Jenkinsfile

28 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

pipeline {
agent any
stages {
2022-12-04 08:51:27 +00:00
stage("Setup") {
steps {
2022-12-04 08:51:27 +00:00
sh 'mamba env update --file environment.yml'
sh 'echo "mamba activate dotnetresxutils" >> ~/.bashrc'
sh "dotnet restore DotNetResxUtils"
sh "dotnet restore DotNetResxUtils.Tests"
}
}
stage("Test") {
steps {
2022-12-04 09:03:21 +00:00
sh "dotnet test --logger xunit --no-restore DotNetResxUtils.Tests"
xunit([xUnitDotNet(excludesPattern: '', pattern: '*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
}
}
stage("Publish") {
steps {
2022-12-04 08:51:27 +00:00
sh "dotnet publish DotNetResxUtils --configuration Release --output output/DotNetResxUtils/DotNetResxUtils-win-x64 --runtime win-x64 --self-contained"
sh "dotnet publish DotNetResxUtils --configuration Release --output output/DotNetResxUtils/DotNetResxUtils-linux-x64 --runtime linux-x64 --self-contained"
fingerprint 'output/DotNetResxUtils/**/DotNetResxUtils*'
tar file: "output/DotNetResxUtils-linux-x64.tar.gz", archive: true, compress: true, dir: "output/DotNetResxUtils/DotNetResxUtils-linux-x64"
zip zipFile: "output/DotNetResxUtils-win-x64.zip", archive: true, dir: "output/DotNetResxUtils/DotNetResxUtils-win-x64"
}
}
}
}