otter-space-sdk/Jenkinsfile
SoXX 8736a2ef5e
All checks were successful
Anthrove/Otter-Space-SDK/pipeline/head This commit looks good
ci: fix attempt #1 sonarqube
2024-07-19 11:16:17 +02:00

38 lines
887 B
Groovy

pipeline {
agent {
docker { image 'docker:dind' }
}
tools {
dockerTool 'Docker'
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Go Test') {
agent {
docker { image 'golang:1.22-alpine' }
}
steps {
sh 'go test -v ./... -json -coverprofile=coverage.out > test-report.out'
}
}
stage('SonarQube Analysis') {
agent {
docker { image 'amazoncorretto:22-alpine' }
}
steps {
script {
def scannerHome = tool 'SonarScanner'
withSonarQubeEnv() {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
}
}
}