|
| 1 | +container: |
| 2 | + kubernetes: &kubernetes |
| 3 | + gitEnvFrom: |
| 4 | + - secretRef: |
| 5 | + name: oss-github-ssh-credentials |
| 6 | + sidecars: |
| 7 | + - image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-dind:v1 |
| 8 | + volumeMounts: |
| 9 | + - mountPath: /var/run/ |
| 10 | + name: docker-sock |
| 11 | + securityContext: |
| 12 | + privileged: true |
| 13 | + allowPrivilegeEscalation: true |
| 14 | + mirrorVolumeMounts: true # CRITICAL: this must be at the same indentation level as sidecars |
| 15 | + podSpec: &podSpec |
| 16 | + containers: |
| 17 | + - &commandContainer |
| 18 | + image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-command-container:v2 |
| 19 | + command: |
| 20 | + - |- |
| 21 | + echo "Command step was not overridden." |
| 22 | + exit 1 |
| 23 | + volumeMounts: |
| 24 | + - mountPath: /var/run/ |
| 25 | + name: docker-sock |
| 26 | + resources: |
| 27 | + requests: |
| 28 | + cpu: 7500m |
| 29 | + memory: 30G |
| 30 | + volumes: |
| 31 | + - name: docker-sock |
| 32 | + emptyDir: {} |
| 33 | + |
| 34 | +agents: |
| 35 | + queue: buildkite-gcp |
| 36 | + |
1 | 37 | steps:
|
2 | 38 | - label: "fossa analyze"
|
3 |
| - agents: |
4 |
| - queue: "init" |
5 |
| - docker: "*" |
6 |
| - command: ".buildkite/scripts/fossa.sh" |
| 39 | + plugins: |
| 40 | + - kubernetes: |
| 41 | + <<: *kubernetes |
| 42 | + podSpec: |
| 43 | + <<: *podSpec |
| 44 | + containers: |
| 45 | + - <<: *commandContainer |
| 46 | + command: |
| 47 | + - |- |
| 48 | + .buildkite/scripts/fossa.sh |
| 49 | +
|
7 | 50 | - label: "Lint Check"
|
8 |
| - agents: |
9 |
| - queue: "init" |
10 |
| - docker: "*" |
11 |
| - command: ".buildkite/scripts/lint.sh" |
12 | 51 | plugins:
|
| 52 | + - kubernetes: |
| 53 | + <<: *kubernetes |
| 54 | + podSpec: |
| 55 | + <<: *podSpec |
| 56 | + containers: |
| 57 | + - <<: *commandContainer |
| 58 | + command: |
| 59 | + - |- |
| 60 | + .buildkite/scripts/lint.sh |
13 | 61 | - docker-compose#v3.0.0:
|
14 | 62 | run: unit-test-test-service
|
15 | 63 | config: docker/buildkite/docker-compose.yaml
|
| 64 | + |
16 | 65 | - label: ":java: Unit test with test services"
|
17 |
| - agents: |
18 |
| - queue: "workers" |
19 |
| - docker: "*" |
20 |
| - command: "./gradlew --no-daemon test jacocoTestReport" |
21 | 66 | artifact_paths:
|
22 | 67 | - "build/reports/jacoco/test/*.xml"
|
23 |
| - timeout_in_minutes: 15 |
| 68 | + timeout_in_minutes: 30 |
24 | 69 | retry:
|
25 | 70 | automatic:
|
26 | 71 | - exit_status: "*"
|
27 | 72 | limit: 3
|
28 | 73 | plugins:
|
| 74 | + - kubernetes: |
| 75 | + <<: *kubernetes |
| 76 | + podSpec: |
| 77 | + <<: *podSpec |
| 78 | + containers: |
| 79 | + - <<: *commandContainer |
| 80 | + command: |
| 81 | + - |- |
| 82 | + ./gradlew --no-daemon test jacocoTestReport |
29 | 83 | - docker-compose#v3.0.0:
|
30 | 84 | run: unit-test-test-service
|
31 | 85 | config: docker/buildkite/docker-compose.yaml
|
32 | 86 |
|
33 | 87 | - label: ":java: Unit test with docker services sticky on"
|
34 |
| - agents: |
35 |
| - queue: "workers" |
36 |
| - docker: "*" |
37 |
| - command: "./gradlew --no-daemon test" |
38 |
| - timeout_in_minutes: 15 |
| 88 | + timeout_in_minutes: 30 |
39 | 89 | retry:
|
40 | 90 | automatic:
|
41 | 91 | - exit_status: "*"
|
42 | 92 | limit: 3
|
43 | 93 | plugins:
|
| 94 | + - kubernetes: |
| 95 | + <<: *kubernetes |
| 96 | + podSpec: |
| 97 | + <<: *podSpec |
| 98 | + containers: |
| 99 | + - <<: *commandContainer |
| 100 | + command: |
| 101 | + - |- |
| 102 | + ./gradlew --no-daemon test |
44 | 103 | - docker-compose#v3.0.0:
|
45 | 104 | run: unit-test-docker-sticky-on
|
46 | 105 | config: docker/buildkite/docker-compose.yaml
|
47 | 106 |
|
48 | 107 | - label: ":java: Unit test with docker services sticky off"
|
49 |
| - agents: |
50 |
| - queue: "workers" |
51 |
| - docker: "*" |
52 |
| - command: "./gradlew --no-daemon test" |
53 |
| - timeout_in_minutes: 15 |
| 108 | + timeout_in_minutes: 30 |
54 | 109 | retry:
|
55 | 110 | automatic:
|
56 | 111 | - exit_status: "*"
|
57 | 112 | limit: 3
|
58 | 113 | plugins:
|
| 114 | + - kubernetes: |
| 115 | + <<: *kubernetes |
| 116 | + podSpec: |
| 117 | + <<: *podSpec |
| 118 | + containers: |
| 119 | + - <<: *commandContainer |
| 120 | + command: |
| 121 | + - |- |
| 122 | + ./gradlew --no-daemon test |
59 | 123 | - docker-compose#v3.0.0:
|
60 | 124 | run: unit-test-docker-sticky-off
|
61 | 125 | config: docker/buildkite/docker-compose.yaml
|
| 126 | + |
62 | 127 | - wait
|
63 | 128 |
|
64 | 129 | - label: ":java: Report test coverage"
|
65 |
| - agents: |
66 |
| - queue: "workers" |
67 |
| - docker: "*" |
68 |
| - command: ".buildkite/scripts/coverage.sh" |
69 | 130 | retry:
|
70 | 131 | automatic:
|
71 | 132 | - exit_status: "*"
|
72 | 133 | limit: 3
|
73 | 134 | plugins:
|
| 135 | + - kubernetes: |
| 136 | + <<: *kubernetes |
| 137 | + podSpec: |
| 138 | + <<: *podSpec |
| 139 | + containers: |
| 140 | + - <<: *commandContainer |
| 141 | + command: |
| 142 | + - |- |
| 143 | + .buildkite/scripts/coverage.sh |
74 | 144 | - docker-compose#v3.0.0:
|
75 | 145 | run: test-coverage-report
|
76 | 146 | config: docker/buildkite/docker-compose.yaml
|
0 commit comments