props/Jenkinsfile
Harrison Deng 641389e79d
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Updating Jenkinsfile to work on common runner.
2024-07-12 22:28:47 +00:00

52 lines
2.4 KiB
Groovy

pipeline {
agent any
stages {
stage("Install") {
steps {
sh 'wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"'
sh 'bash Miniforge3.sh -b -p "${HOME}/conda"'
sh 'echo "conda activate props" >> ~/.bashrc'
sh 'node --version && npm --version'
sh 'cd Props && npm install'
sh 'dotnet restore Props.Shop/Props.Shop.sln'
sh 'dotnet restore Props.Tests'
}
}
stage("Props.Shop") {
stages {
stage("Test") {
steps {
sh 'dotnet test --logger xunit --no-restore Props.Shop/Props.Shop.sln'
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
}
}
stage("Publish") {
steps {
sh 'dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln'
fingerprint 'output/shop-modules/**/Props.Shop.*'
sh "python3 scripts/load_shop_modules.py"
}
}
}
}
stage("Props") {
stages {
stage("Test") {
steps {
sh 'dotnet test --logger xunit --no-restore Props.Tests'
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
}
}
stage("Publish") {
steps {
sh 'dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props'
sh '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"
}
}
}
}
}
}