|
8 | 8 | # CI run podman instead of linux. testcontainer's ryuk is reported to not |
9 | 9 | # work well with podman. |
10 | 10 | TESTCONTAINERS_RYUK_DISABLED: "true" |
| 11 | +# pipeline.yml is the "entrypoint" for all BuildKite pipelines in the operator |
| 12 | +# repo. As such, it is executed for ANY trigger (e.g. PR update/created, Tag |
| 13 | +# updated/created, Schedule run). Use `if`s to delegate to specific pipeline |
| 14 | +# from this file and try to adhere to the below rules. |
| 15 | +# |
| 16 | +# Do: |
| 17 | +# - Use `gen` to generate pipeline files. |
| 18 | +# - Use `if` to gate the execution of pipelines. |
| 19 | +# - Include a human readable explanation of `if` gates. |
| 20 | +# - Separate pipelines into distinct files and use `buildkite-agent pipeline upload`. |
| 21 | +# - Chain together tasks (e.g. `task ci:setup ci:run-test ci:tear-down). |
| 22 | +# |
| 23 | +# Do not: |
| 24 | +# - Use taskfile to gate execution of steps. |
| 25 | +# - Have a pipeline serve multiple purposes. |
11 | 26 | steps: |
| 27 | + # ci-entry-point kicks off the complete operator test suite. |
| 28 | + # It is responsible for blocking or allowing GitHub PRs to be merged. |
| 29 | + - key: ci-entry-point |
| 30 | + label: Operator CI Entrypoint |
| 31 | + agents: |
| 32 | + queue: pipeline-uploader |
| 33 | + # Run for: |
| 34 | + # - all pull requests that aren't from forks. |
| 35 | + # - nightly test schedule |
| 36 | + if: | |
| 37 | + (build.pull_request.id != null && !build.pull_request.repository.fork) || (build.source == "schedule" && build.env("K8S_NIGHTLY") == "1") |
| 38 | + command: buildkite-agent pipeline upload .buildkite/testsuite.yml |
| 39 | + |
12 | 40 | - key: release-nightly |
13 | 41 | label: ":gandalf: Nightly Operator release" |
14 | 42 | timeout_in_minutes: 10 |
@@ -38,46 +66,13 @@ steps: |
38 | 66 | branches: |
39 | 67 | - main |
40 | 68 |
|
41 | | - - key: operator-lint |
42 | | - label: Lint operator repo |
43 | | - if: | |
44 | | - build.env("NIGHTLY_RELEASE") != "true" && |
45 | | - build.tag == null || |
46 | | - build.env("K8S_NIGHTLY") == "1" |
47 | | - timeout_in_minutes: 30 |
48 | | - notify: |
49 | | - - github_commit_status: |
50 | | - context: charts-lint |
51 | | - commands: |
52 | | - - | |
53 | | - TAG_NAME=$(ci/scripts/tag-check.sh) ./ci/scripts/run-in-nix-docker.sh task ci:configure ci:lint |
54 | | - - echo '~~~ pipeline upload unit tests' && buildkite-agent pipeline upload .buildkite/unit-tests.yml |
55 | | - - echo '~~~ pipeline upload operator e2e tests with flags' && buildkite-agent pipeline upload .buildkite/operator-e2e-tests-with-flags.yml |
56 | | - - echo '~~~ pipeline upload operator integration tests' && buildkite-agent pipeline upload .buildkite/integration-test.yml |
57 | | - - echo '~~~ pipeline upload operator v2 e2e tests' && buildkite-agent pipeline upload .buildkite/operator-v2-tests.yml |
58 | | - agents: |
59 | | - queue: v6-amd64-builders-m6id |
60 | | - plugins: |
61 | | - - seek-oss/aws-sm#v2.3.2: |
62 | | - json-to-env: |
63 | | - - secret-id: sdlc/prod/buildkite/github_api_token |
64 | | - - secret-id: sdlc/prod/buildkite/slack_vbot_token |
65 | | - - https://$GITHUB_API_TOKEN@github.com/redpanda-data/step-slack-notify-buildkite-plugin.git#main: |
66 | | - message: ":cloud: K8S operator lint Jobs failed" |
67 | | - channel_name: "kubernetes-tests" |
68 | | - slack_token_env_var_name: "SLACK_VBOT_TOKEN" |
69 | | - conditions: |
70 | | - failed: true |
71 | | - branches: |
72 | | - - main |
73 | | - |
| 69 | + # Legacy pipeline that appears to be responsible for minting releases, |
| 70 | + # provided that kuttl-v1 tests pass. |
| 71 | + # TODO: Scope this to just producing releases, both nightly and on tag. |
74 | 72 | - key: k8s-operator |
75 | 73 | label: Operator v1 E2E tests or release |
76 | 74 | timeout_in_minutes: 180 |
77 | | - if: build.env("NIGHTLY_RELEASE") != "true" |
78 | | - notify: |
79 | | - - github_commit_status: |
80 | | - context: k8s-operator-e2e-tests |
| 75 | + if: build.env("NIGHTLY_RELEASE") != "true" && build.pull_request.id == null |
81 | 76 | commands: |
82 | 77 | - | |
83 | 78 | TAG_NAME=$(ci/scripts/tag-check.sh) ./ci/scripts/run-in-nix-docker.sh task ci:configure ci:k8s |
@@ -112,14 +107,3 @@ steps: |
112 | 107 | failed: true |
113 | 108 | branches: |
114 | 109 | - main |
115 | | - |
116 | | - - key: k8s-operator-v2-helm |
117 | | - label: K8s Operator v2 Helm |
118 | | - if: build.env("NIGHTLY_RELEASE") != "true" |
119 | | - notify: |
120 | | - - github_commit_status: |
121 | | - context: k8s-operator-v2-helm |
122 | | - commands: |
123 | | - - echo Tests where failing and K8S disabled this test suite. K8S team want to sunset kuttle base tests to new testing framework. If any of those test would be beneficial then they will be backported |
124 | | - agents: |
125 | | - queue: pipeline-uploader |
0 commit comments