forked from dolthub/dolt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
119 lines (119 loc) · 5.86 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
pipeline {
agent none
stages {
stage('Test') {
parallel {
stage ("go/") {
agent {
kubernetes {
label "liquidata-inc-ld-build"
}
}
environment {
PATH = "${pwd()}/.ci_bin:${env.HOME}/go/bin:${env.PATH}"
}
steps {
dir ("go") {
// Keep this in sync with //go/utils/prepr/prepr.sh.
sh "go get -mod=readonly ./..."
sh "./utils/repofmt/check_fmt.sh"
sh "./Godeps/verify.sh"
sh "./utils/checkcommitters/check_pr.sh"
sh "go vet -mod=readonly ./..."
sh "go run -mod=readonly ./utils/copyrightshdrs/"
sh "go test -mod=readonly -test.v ./..."
}
}
}
stage ("bats/") {
agent {
kubernetes {
label "liquidata-inc-ld-build"
}
}
environment {
PATH = "${pwd()}/.ci_bin/pyenv/bin:${pwd()}/.ci_bin:${pwd()}/.ci_bin/node_modules/.bin:${env.PATH}"
AWS_SDK_LOAD_CONFIG = "1"
AWS_REGION = "us-west-2"
DOLT_BATS_AWS_TABLE = "dolt-ci-bats-manifests-us-west-2"
DOLT_BATS_AWS_BUCKET = "dolt-ci-bats-chunks-us-west-2"
DOLT_BATS_AWS_EXISTING_REPO = "aws_remote_bats_tests"
}
steps {
dir (".ci_bin") {
sh "npm i bats"
}
dir ("go") {
sh "go get -mod=readonly ./..."
sh "go build -mod=readonly -o ../.ci_bin/dolt ./cmd/dolt/."
sh "go build -mod=readonly -o ../.ci_bin/git-dolt ./cmd/git-dolt/."
sh "go build -mod=readonly -o ../.ci_bin/git-dolt-smudge ./cmd/git-dolt-smudge/."
sh "go build -mod=readonly -o ../.ci_bin/remotesrv ./utils/remotesrv/."
}
sh "python3 -m venv .ci_bin/pyenv"
sh "./.ci_bin/pyenv/bin/pip install doltpy"
sh "dolt config --global --add user.name 'Liquidata Jenkins'"
sh "dolt config --global --add user.email '[email protected]'"
dir ("bats") {
sh "bats ."
}
}
}
stage ("Windows") {
agent {
label "windows"
}
environment {
PATH = "C:\\tools\\msys64\\mingw64\\bin;${pwd()}\\.ci_bin;${env.PATH}"
}
steps {
dir ("go/") {
bat "go test ./..."
bat "go build -mod=readonly -o ..\\.ci_bin\\dolt.exe ./cmd/dolt/."
bat "copy /Y ..\\.ci_bin\\dolt.exe ..\\.ci_bin\\dolt"
bat "go build -mod=readonly -o ..\\.ci_bin\\git-dolt.exe ./cmd/git-dolt/."
bat "copy /Y ..\\.ci_bin\\git-dolt.exe ..\\.ci_bin\\git-dolt"
bat "go build -mod=readonly -o ..\\.ci_bin\\git-dolt-smudge.exe ./cmd/git-dolt-smudge/."
bat "copy /Y ..\\.ci_bin\\git-dolt-smudge.exe ..\\.ci_bin\\git-dolt-smudge"
bat "go build -mod=readonly -o ..\\.ci_bin\\remotesrv.exe ./utils/remotesrv/."
bat "copy /Y ..\\.ci_bin\\remotesrv.exe ..\\.ci_bin\\remotesrv"
}
dir ("bats/") {
bat "dolt config --global --add user.name \"Liquidata Jenkins\""
bat "dolt config --global --add user.email \"[email protected]\""
bat "C:\\wsl.exe bats `pwd`"
}
dir ("./") {
bat(returnStatus: true, script: "setLocal EnableDelayedExpansion && pushd %LOCALAPPDATA%\\Temp && del /q/f/s .\\* >nul 2>&1 && rmdir /s/q . >nul 2>&1 && popd")
bat(returnStatus: true, script: "setLocal EnableDelayedExpansion && pushd C:\\batstmp && del /q/f/s .\\* >nul 2>&1 && rmdir /s/q . >nul 2>&1 && popd")
}
}
}
stage ("compatibility/") {
agent {
kubernetes {
label "liquidata-inc-ld-build"
}
}
environment {
PATH = "${pwd()}/.ci_bin:${pwd()}/.ci_bin/node_modules/.bin:${env.PATH}"
}
steps {
dir (".ci_bin") {
sh "npm i bats"
}
dir ("go") {
sh "go get -mod=readonly ./..."
sh "go build -mod=readonly -o ../.ci_bin/dolt ./cmd/dolt/."
}
sh "dolt config --global --add user.name 'Liquidata Jenkins'"
sh "dolt config --global --add user.email '[email protected]'"
dir ("bats/compatibility") {
sh "./runner.sh"
}
}
}
}
}
}
}