2022-04-24 05:01:55 +00:00
|
|
|
pipeline {
|
2024-07-12 22:28:47 +00:00
|
|
|
agent {
|
|
|
|
kubernetes {
|
|
|
|
cloud 'Reslate Systems'
|
|
|
|
defaultContainer 'conda'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-24 05:01:55 +00:00
|
|
|
stages {
|
2022-12-01 04:48:54 +00:00
|
|
|
stage("Install") {
|
2022-04-25 08:56:41 +00:00
|
|
|
steps {
|
2024-07-19 17:15:04 +00:00
|
|
|
sh 'conda update conda -y'
|
2024-07-12 22:28:47 +00:00
|
|
|
sh 'conda env update -n base --file .devcontainer/environment.yml'
|
2024-07-19 17:15:04 +00:00
|
|
|
sh 'conda run -n base dotnet restore props.sln'
|
2024-07-12 22:28:47 +00:00
|
|
|
sh 'npm install --prefix ./Props'
|
2022-04-25 08:56:41 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-24 05:01:55 +00:00
|
|
|
stage("Props.Shop") {
|
|
|
|
stages {
|
|
|
|
stage("Test") {
|
|
|
|
steps {
|
2024-07-19 17:50:17 +00:00
|
|
|
sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Shop/**/*.Tests.csproj'
|
2022-04-25 07:44:05 +00:00
|
|
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
2022-04-24 05:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Publish") {
|
|
|
|
steps {
|
2024-07-19 18:06:01 +00:00
|
|
|
sh '''#!/bin/bash
|
|
|
|
for file in Props.Shop/**/*.csproj do
|
|
|
|
conda run -n base dotnet publish --configuration Release --output output/shop-modules $file
|
|
|
|
done
|
|
|
|
'''
|
2024-07-12 22:28:47 +00:00
|
|
|
sh 'rm output/shop-modules/**/*.Tests.dll'
|
2022-04-26 08:40:29 +00:00
|
|
|
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
2024-07-12 22:28:47 +00:00
|
|
|
sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.'
|
2022-04-24 05:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Props") {
|
|
|
|
stages {
|
|
|
|
stage("Test") {
|
|
|
|
steps {
|
2024-07-19 17:50:17 +00:00
|
|
|
sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Tests/Props.Tests.csproj'
|
2022-04-25 07:44:05 +00:00
|
|
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
2022-04-24 05:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Publish") {
|
|
|
|
steps {
|
2024-07-12 22:28:47 +00:00
|
|
|
sh 'conda run -n base dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props'
|
|
|
|
sh 'conda run -n base dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props'
|
2022-04-26 08:40:29 +00:00
|
|
|
fingerprint 'output/props/**/Props*'
|
2022-04-26 08:48:05 +00:00
|
|
|
tar file: "output/props-linux-x64.tar.gz", archive: true, compress: true, dir: "output/props/props-linux-x64"
|
|
|
|
zip zipFile: "output/props-win-x64.zip", archive: true, dir: "output/props/props-win-x64"
|
2022-04-24 05:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|