2023-11-10 17:19:44 +00:00
|
|
|
pipeline {
|
2023-11-10 17:41:23 +00:00
|
|
|
agent any
|
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(numToKeepStr: "100"))
|
|
|
|
skipDefaultCheckout(true)
|
|
|
|
}
|
|
|
|
triggers {
|
|
|
|
pollSCM("*/10 * * * *")
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
environment {
|
|
|
|
MSBUILD_SQ_SCANNER_HOME = tool name: 'sonarscanner', type: 'hudson.plugins.sonar.MsBuildSQRunnerInstallation'
|
|
|
|
DOTNET_USE_POLLING_FILE_WATCHER = true
|
|
|
|
DOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE = false
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
stages {
|
|
|
|
stage('Checkout'){
|
|
|
|
steps{
|
|
|
|
cleanWs()
|
|
|
|
checkout scm
|
|
|
|
}
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|
2023-11-10 17:41:23 +00:00
|
|
|
stage('Clean'){
|
|
|
|
steps {
|
|
|
|
withEnv(["PATH+RUST=$HOME/.cargo/bin"]) {
|
|
|
|
sh 'cargo clean'
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|
2023-11-10 17:41:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build'){
|
|
|
|
steps {
|
|
|
|
withSonarQubeEnv(installationName: 'grover.local:9000', envOnly: true) {
|
|
|
|
withEnv(["PATH+RUST=$HOME/.cargo/bin"]) {
|
|
|
|
sh 'cargo build --release'
|
|
|
|
}
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|
2023-11-10 17:41:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
stage('SonarQube Analysis') {
|
|
|
|
steps {
|
|
|
|
withSonarQubeEnv('grover.local:9000') {
|
|
|
|
sh "dotnet ${MSBUILD_SQ_SCANNER_HOME}/SonarScanner.MSBuild.dll end"
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|
2023-11-10 17:41:23 +00:00
|
|
|
}
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|
2023-11-10 17:41:23 +00:00
|
|
|
*/
|
|
|
|
}
|
2023-11-10 17:19:44 +00:00
|
|
|
}
|