-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
65 lines (57 loc) · 1.33 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git(url: 'https://github.com/APoniatowski/GoSSH', branch: 'v1')
}
}
stage('Go Test') {
steps {
echo 'Fetching dependencies and last minute tidy'
sh 'go mod tidy'
echo 'Running go test'
sh 'go test -v main.go'
}
}
stage('Build') {
parallel {
stage('Build') {
steps {
echo 'Compiling GoSSH - Linux'
sh 'GOOS=linux go build -v'
}
}
stage('Windows') {
steps {
echo 'Compiling GoSSH - Windows'
sh 'GOOS=windows go build -v'
}
}
stage('FreeBSD') {
steps {
echo 'Compiling GoSSH - FreeBSD'
sh 'GOOS=freebsd go build -o "GOSSH-bsd" -v'
}
}
stage('MacOS') {
steps {
echo 'Compiling GoSSH - MAC'
sh 'GOOS=darwin go build -o "GoSSH-mac" -v'
}
}
}
}
stage('SooS') {
steps {
echo 'Placeholder for further post-compilation testing'
echo 'and whatever else I can think of. I am setting up'
echo 'a small virtual infrastructure for testing'
}
}
}
environment {
XDG_CACHE_HOME = '/tmp'
CGO_ENABLED = '0'
}
}