Began updating to .NET 8.0.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit

This commit is contained in:
2024-07-18 04:38:08 +00:00
parent 0811fe34a0
commit ced027da17
8 changed files with 81 additions and 20 deletions

22
Jenkinsfile vendored
View File

@@ -8,17 +8,16 @@ pipeline {
# According to https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#examples
# and https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
curl -L -o- https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0
echo \'export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1\' >> ~/.profile
echo \'export DOTNET_ROOT=$HOME/.dotnet\' >> ~/.profile
echo \'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools\' >> ~/.profile
echo export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 >> ~/.bashrc
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc
# Installing Node Version Manager
# According to https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# According to https://github.com/Schniz/fnm
curl -fsSL https://fnm.vercel.app/install | bash
'''
sh '''#!/bin/bash
source ~/.profile
nvm install 20.15.1
nvm use default
fnm install 20.15.1
fnm use default
# Restore all projects
dotnet restore Props/Props.csproj
dotnet restore Props.Tests/Props.Tests.csproj
@@ -32,8 +31,7 @@ pipeline {
stage("Test") {
steps {
sh '''#!/bin/bash
source ~/.profile
dotnet test --logger xunit --no-restore Props.Shop/Props.Shop.sln
dotnet test --logger xunit --no-restore Props.Shop/Adafruit.Tests/Props.Shop.Adafruit.Tests.csproj
'''
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
}
@@ -41,12 +39,10 @@ pipeline {
stage("Publish") {
steps {
sh '''#!/bin/bash
source ~/.profile
dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln
'''
fingerprint 'output/shop-modules/**/Props.Shop.*'
sh '''#!/bin/bash
source ~/.profile
cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.
'''
}
@@ -58,7 +54,6 @@ pipeline {
stage("Test") {
steps {
sh '''#!/bin/bash
source ~/.profile
dotnet test --logger xunit --no-restore Props.Tests
'''
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
@@ -67,7 +62,6 @@ pipeline {
stage("Publish") {
steps {
sh '''#!/bin/bash
source ~/.profile
dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props
dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props
'''