Harrison Deng
a4adb7c582
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
61 lines
2.7 KiB
Groovy
61 lines
2.7 KiB
Groovy
pipeline {
|
|
agent {
|
|
kubernetes {
|
|
cloud 'Reslate Systems'
|
|
defaultContainer 'conda'
|
|
}
|
|
}
|
|
|
|
stages {
|
|
stage("Install") {
|
|
steps {
|
|
sh 'conda update conda -y'
|
|
sh 'conda env update -n base --file .devcontainer/environment.yml'
|
|
sh 'conda run -n base dotnet restore props.sln'
|
|
sh 'npm install --prefix ./Props'
|
|
}
|
|
}
|
|
stage("Props.Shop") {
|
|
stages {
|
|
stage("Test") {
|
|
steps {
|
|
sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Shop/**/*.Tests.csproj'
|
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
|
}
|
|
}
|
|
stage("Publish") {
|
|
steps {
|
|
sh '''#!/bin/bash
|
|
for file in Props.Shop/**/*.csproj
|
|
do
|
|
conda run -n base dotnet publish --configuration Release --output output/shop-modules $file
|
|
done
|
|
'''
|
|
sh 'rm output/shop-modules/**/*.Tests.dll'
|
|
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
|
sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage("Props") {
|
|
stages {
|
|
stage("Test") {
|
|
steps {
|
|
sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Tests/Props.Tests.csproj'
|
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
|
}
|
|
}
|
|
stage("Publish") {
|
|
steps {
|
|
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'
|
|
fingerprint 'output/props/**/Props*'
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |