folderwatcher/Jenkinsfile
Christian Schmied 479ed620e3
All checks were successful
go/folderwatcher/pipeline/head This commit looks good
rename Build to Test
2024-09-26 12:35:15 +02:00

56 lines
1.3 KiB
Groovy

pipeline {
environment {
ORG = "go"
APP = "folderwatcher"
GIT_REPO_OWNER = "go"
GIT_REPO_NAME = "folderwatcher"
}
agent {
docker {
image 'docker.sportwanninger.de/infrastructure/golang-mingw:1.23.1'
args "${dindArgs()}"
}
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
disableConcurrentBuilds()
}
stages {
stage('Test') {
environment {
CGO_ENABLED = "1"
GOOS = "linux"
CXX = "g++"
CC = "gcc"
}
steps {
ansiColor('xterm') {
sh "go test ./..."
}
}
}
stage('Test Win') {
environment {
CGO_ENABLED = "1"
GOOS = "windows"
CXX = "x86_64-w64-mingw32-g++"
CC = "x86_64-w64-mingw32-gcc"
}
steps {
ansiColor('xterm') {
sh "go test -exec wine64 -ldflags \"-extldflags '-static -fstack-protector'\" ./..."
}
}
}
}
post {
always {
script {
sendBuildMessage();
}
}
}
}