fix: 更新 Jenkinsfile 路径(backend 为仓库根目录)
This commit is contained in:
parent
a6402973ca
commit
978247fd55
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -3,28 +3,23 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
||||||
PROJECT_DIR = 'backend'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Restore') {
|
stage('Restore') {
|
||||||
steps {
|
steps {
|
||||||
echo '=== Restore NuGet Packages ==='
|
echo '=== Restore NuGet Packages ==='
|
||||||
dir("${PROJECT_DIR}") {
|
|
||||||
sh 'dotnet restore'
|
sh 'dotnet restore'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
echo '=== Build Solution ==='
|
echo '=== Build Solution ==='
|
||||||
dir("${PROJECT_DIR}") {
|
|
||||||
sh 'dotnet build --no-restore --warnings-as-errors'
|
sh 'dotnet build --no-restore --warnings-as-errors'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user