archiver/Jenkinsfile

57 lines
1.3 KiB
Text
Raw Normal View History

2024-09-26 11:39:22 +02:00
pipeline {
environment {
ORG = "go"
APP = "archiver"
GIT_REPO_OWNER = "go"
GIT_REPO_NAME = "archiver"
}
agent {
docker {
image 'docker.sportwanninger.de/infrastructure/golang-mingw:1.23.1'
args "${dindArgs()}"
}
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
disableConcurrentBuilds()
}
stages {
stage('Build') {
environment {
CGO_ENABLED = "1"
GOOS = "linux"
CXX = "g++"
CC = "gcc"
}
steps {
ansiColor('xterm') {
sh "go test ./..."
}
}
}
stage('Build 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();
}
}
}
}