JK
This commit is contained in:
parent
2f161ab232
commit
fef65d1cf8
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -3,6 +3,7 @@ pipeline {
|
||||
docker {
|
||||
image 'mcr.microsoft.com/dotnet/sdk:9.0'
|
||||
args '-u root:root'
|
||||
label "${params.AGENT_LABEL ?: 'docker'}"
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +18,7 @@ pipeline {
|
||||
parameters {
|
||||
string(name: 'GIT_URL', defaultValue: 'file:///SourceCode/repos/AS400API.git', description: 'Git repository URL to clone')
|
||||
string(name: 'GIT_BRANCH', defaultValue: 'main', description: 'Branch or ref to build')
|
||||
string(name: 'AGENT_LABEL', defaultValue: 'docker', description: 'Label of Jenkins agent with Docker CLI access')
|
||||
}
|
||||
|
||||
environment {
|
||||
@ -70,10 +72,12 @@ pipeline {
|
||||
dotnet tool install --global dotnet-sonarscanner || dotnet tool update --global dotnet-sonarscanner
|
||||
'''
|
||||
script {
|
||||
if (!env.PATH.contains('/root/.dotnet/tools')) {
|
||||
env.PATH = "${env.PATH}:/root/.dotnet/tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Restore') {
|
||||
steps {
|
||||
@ -181,7 +185,7 @@ pipeline {
|
||||
|
||||
post {
|
||||
always {
|
||||
cleanWs()
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user