This commit is contained in:
parent
716f36d14d
commit
f8bb088574
1 changed files with 56 additions and 0 deletions
56
Jenkinsfile
vendored
Normal file
56
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue