Harrison Deng
4bc5375bc7
Some checks failed
RealYHD/dotnetresxutils/pipeline/head There was a failure building this commit
28 lines
1.4 KiB
Groovy
28 lines
1.4 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage("Setup") {
|
|
steps {
|
|
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 {
|
|
sh "dotnet test --logger xunit --no-restore DotNetResxUtils.Tests"
|
|
xunit([xUnitDotNet(excludesPattern: '', pattern: '*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
|
}
|
|
}
|
|
stage("Publish") {
|
|
steps {
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
} |