Add jenkins build #1

Merged
phlaym merged 11 commits from jenkins into main 2023-11-30 17:33:12 +00:00
Showing only changes of commit 4ccaf9976a - Show all commits

84
Jenkinsfile vendored
View File

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