-
Notifications
You must be signed in to change notification settings - Fork 126
/
Jenkinsfile
59 lines (56 loc) · 2.96 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
pipeline {
agent none
options {
timeout(time: 60, unit: 'MINUTES')
}
stages {
stage("Entry") {
parallel {
stage("Windows Node") {
agent { label 'couchbase-lite-net-validation' }
stages {
stage("Checkout") {
steps {
powershell '''
New-Item -Type Directory tmp
Get-ChildItem -Path $pwd -Exclude "tmp" -Force | Move-Item -Destination "tmp"
# Sometimes a PR depends on a PR in the EE repo as well. This needs to be convention based, so if there is a branch with the name PR-###
# (with the GH PR number) in the EE repo then use that, otherwise use the name of the target branch (master, release/XXX etc)
& 'C:\\Program Files\\Git\\bin\\git.exe' clone [email protected]:couchbaselabs/couchbase-lite-net-ee --branch $env:BRANCH_NAME --depth 1 couchbase-lite-net-ee
if($LASTEXITCODE -ne 0) {
& 'C:\\Program Files\\Git\\bin\\git.exe' clone [email protected]:couchbaselabs/couchbase-lite-net-ee --branch $env:CHANGE_TARGET --depth 1 couchbase-lite-net-ee
}
Get-ChildItem couchbase-lite-net-ee\\* -Force | Move-Item -Destination .
New-Item -Type Directory couchbase-lite-net
Get-ChildItem -Force tmp\\* | Move-Item -Destination couchbase-lite-net
Remove-Item tmp
Remove-Item couchbase-lite-net-ee
# Make sure the latest tools are checked out
& 'C:\\Program Files\\Git\\bin\\git.exe' submodule update --init
Push-Location jenkins
& 'C:\\Program Files\\Git\\bin\\git.exe' clone https://github.com/couchbaselabs/couchbase-lite-net-validation --depth 1 proj
Pop-Location
'''
}
}
stage("Compile CE") {
steps {
powershell 'jenkins\\compile_ce.ps1'
}
}
stage("Compile EE") {
steps {
powershell 'jenkins\\compile_ee.ps1'
}
}
stage(".NET Windows") {
steps {
powershell 'jenkins\\run_net_console_tests.ps1'
}
}
}
}
}
}
}
}