forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap-security-pull.yaml
130 lines (130 loc) · 4.11 KB
/
bootstrap-security-pull.yaml
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
120
121
122
123
124
125
126
127
128
129
130
- job-template:
name: 'pull-security-{suffix}'
concurrent: true
properties:
- build-discarder:
days-to-keep: 7
- throttle:
max-total: '{max-total}'
max-per-node: 2
option: project
- raw:
xml: |
<com.cloudbees.plugins.JobPrerequisites plugin="slave-prerequisites@1.0">
<script>docker version; gcloud version</script>
<interpreter>shell script</interpreter>
</com.cloudbees.plugins.JobPrerequisites>
parameters:
# TODO(spxtr): Delete these two.
- string:
name: ghprbPullId
- string:
name: ghprbTargetBranch
- string:
name: PULL_REFS
- string:
name: PULL_NUMBER
- string:
name: PULL_BASE_REF
# The test job tracks a run through the queue using the buildId parameter.
- string:
name: buildId
wrappers:
- e2e-credentials-binding
- credentials-binding:
- file:
credential-id: 'k8s-security-repo-git-ssh-key'
variable: 'K8S_SECURITY_SSH_PRIVATE_KEY_FILE'
- inject:
properties-content: |
GOROOT=/usr/local/go
GOPATH=$WORKSPACE/go
PATH=$PATH:$GOROOT/bin:$WORKSPACE/go/bin
- workspace-cleanup:
dirmatch: true
exclude:
- 'go/src/{repo-name}/.git/'
- 'test-infra/.git/'
external-deletion-command: 'sudo rm -rf %s'
- timeout:
timeout: 90
fail: true
builders:
- shell: |
# TODO(fejta): consider a stable tag instead of master
git clone https://github.com/kubernetes/test-infra -b master
'./test-infra/jenkins/bootstrap.py' \
--job='{job-name}' \
--json='{json}' \
--pull="${{PULL_REFS}}" \
--repo='{repo-name}' \
--root="${{GOPATH}}/src" \
--service-account="${{GOOGLE_APPLICATION_CREDENTIALS}}" \
--timeout='{timeout}' \
--upload='gs://kubernetes-security-jenkins/pr-logs' \
--ssh="${{K8S_SECURITY_SSH_PRIVATE_KEY_FILE}}"
- project:
name: bootstrap-security-pull-jobs
jobs:
- 'pull-security-{suffix}'
suffix: # pull-<repo>-<suffix> is the expected format
- kubernetes-cross:
max-total: 12
job-name: pull-kubernetes-cross
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 80
- kubernetes-e2e-gce:
max-total: 12
job-name: pull-kubernetes-e2e-gce
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 75
- kubernetes-e2e-gce-gci:
max-total: 12
job-name: pull-kubernetes-e2e-gce-gci
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 75
- kubernetes-e2e-gce-etcd3:
max-total: 12
job-name: pull-kubernetes-e2e-gce-etcd3
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 85
- kubernetes-e2e-kops-aws:
max-total: 12
job-name: pull-kubernetes-e2e-kops-aws
json: 0
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 0
- kubernetes-kubemark-e2e-gce:
max-total: 12
job-name: pull-kubernetes-kubemark-e2e-gce
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 65
- kubernetes-kubemark-e2e-gce-gci:
max-total: 12
job-name: pull-kubernetes-kubemark-e2e-gce-gci
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 75
- kubernetes-node-e2e:
max-total: 12
job-name: pull-kubernetes-node-e2e
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 90
- kubernetes-verify:
max-total: 12
job-name: pull-kubernetes-verify
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 60
- kubernetes-unit:
max-total: 12
job-name: pull-kubernetes-unit
json: 1
repo-name: 'github.com/kubernetes-security/kubernetes'
timeout: 60