Updating Jenkinsfile to work on common runner.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Began moving poject to a devcontainer. Added webpack cache clearing script. Updated to .NET 8.0. testing Woodpecker CI. Selecting conda container for all build steps. Made conda installation quiet. Updated NodeJS version.
This commit is contained in:
34
Jenkinsfile
vendored
34
Jenkinsfile
vendored
@@ -1,30 +1,36 @@
|
||||
pipeline {
|
||||
agent any
|
||||
agent {
|
||||
kubernetes {
|
||||
cloud 'Reslate Systems'
|
||||
defaultContainer 'conda'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Install") {
|
||||
steps {
|
||||
sh 'mamba env update --file environment.yml'
|
||||
sh 'echo "mamba 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.Shop/Props.Shop.Tests.sln'
|
||||
sh 'dotnet restore Props.Tests'
|
||||
sh 'conda update conda'
|
||||
sh 'conda env update -n base --file .devcontainer/environment.yml'
|
||||
sh 'conda run -n base dotnet restore Props/Props.csproj'
|
||||
sh 'conda run -n base dotnet restore Props.Tests/Props.Tests.csproj'
|
||||
sh 'conda run -n base dotnet restore Props.Shop/Props.Shop.sln'
|
||||
sh 'npm install --prefix ./Props'
|
||||
}
|
||||
}
|
||||
stage("Props.Shop") {
|
||||
stages {
|
||||
stage("Test") {
|
||||
steps {
|
||||
sh 'dotnet test --logger xunit --no-restore Props.Shop/Props.Shop.Tests.sln'
|
||||
sh '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 'dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln'
|
||||
sh 'conda run -n base dotnet publish --configuration Release --output output/shop-modules Props.Shop/*.csproj'
|
||||
sh 'rm output/shop-modules/**/*.Tests.dll'
|
||||
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
||||
sh "python3 scripts/load_shop_modules.py"
|
||||
sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,14 +39,14 @@ pipeline {
|
||||
stages {
|
||||
stage("Test") {
|
||||
steps {
|
||||
sh 'dotnet test --logger xunit --no-restore Props.Tests'
|
||||
sh '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 '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'
|
||||
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"
|
||||
|
Reference in New Issue
Block a user