blob: b01939e717d07436f2b7a975195ad2441e1be027 [file] [log] [blame]
Denis Egorenkoff32a4d2016-12-21 14:41:53 +00001// Default parameters
2
3 targetDir = "./"
4 port = "29418"
5
6// Usage example
7node {
8 gitSSHCheckout {
9 credentialsId = "mcp-ci-gerrit"
10 branch = "mcp-0.1"
11 host = "ci.mcp-ci.local"
12 project = "projectcalico/calico-containers"
13 }
14}
15
16// or
17
18node {
19 gitSSHCheckout {
20 credentialsId = "mcp-ci-gerrit"
21 branch = "mcp-0.1"
22 host = "ci.mcp-ci.local"
23 project = "projectcalico/calico-containers"
24 targetDir = "some_directory"
25 }
26}
27
28// by default if you checkout even to branch you will be in detached mode
29// but some tools (e.g. pip) requires "merged" code
30// https://issues.jenkins-ci.org/browse/JENKINS-6856
31// so you need to use withMerge = true
32
33node {
34 gitSSHCheckout {
35 credentialsId = "mcp-ci-gerrit"
36 branch = "mcp"
37 host = "ci.mcp-ci.local"
38 project = "projectcalico/calico-containers"
39 targetDir = "some_directory"
40 withMerge = true
41 }
42}
43
44Please see example below:
451. withMerge = false (default)
46 $ git status
47 HEAD detached at 25fd9c2
48 nothing to commit, working directory clean
49 $ git branch -av
50 * (HEAD detached at 25fd9c2) 25fd9c2 Fix .gitreview
51 remotes/origin/HEAD 7e2b36e Merge pull request #160 from tomdee/tiny-build-image-size-tweaks
52 remotes/origin/develop 013614f Merge pull request #144 from djosborne/comment-etcd-pin
53 remotes/origin/feature/utreports 3c52c2a disable usage reports while running unit tests
54 remotes/origin/go 350e251 Merge pull request #128 from caseydavenport/ipam-code-review
55 remotes/origin/master 7e2b36e Merge pull request #160 from tomdee/tiny-build-image-size-tweaks
56 remotes/origin/mcp 25fd9c2 Fix .gitreview
57
58
592. withMerge = true
60 $ git status
61 On branch mcp
62 nothing to commit, working directory clean
63 $ git branch -av
64 * mcp 25fd9c2 Fix .gitreview
65 remotes/origin/HEAD 7e2b36e Merge pull request #160 from tomdee/tiny-build-image-size-tweaks
66 remotes/origin/develop 013614f Merge pull request #144 from djosborne/comment-etcd-pin
67 remotes/origin/feature/utreports 3c52c2a disable usage reports while running unit tests
68 remotes/origin/go 350e251 Merge pull request #128 from caseydavenport/ipam-code-review
69 remotes/origin/master 7e2b36e Merge pull request #160 from tomdee/tiny-build-image-size-tweaks
70 remotes/origin/mcp 25fd9c2 Fix .gitreview