Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ops] POC: PR-build on CI-Systems buildkite (cont'd) #171317

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
93fa9d7
Squashed work of Brian Seeders:
brianseeders May 9, 2023
e2fc3ec
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 16, 2023
2970488
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 16, 2023
2c2b3e3
re-add upload step
delanni Nov 16, 2023
3e72554
try gobld queue
delanni Nov 16, 2023
c6614c5
enable kme-poc build trigger
delanni Nov 16, 2023
7cd57cf
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 16, 2023
f954cb8
skip when non-empty string is the label
delanni Nov 16, 2023
c4de3bd
disable build on comment
delanni Nov 16, 2023
dcf4210
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 20, 2023
6bb354f
Remove criteria that would skip setting up kibana's required tooling
delanni Nov 20, 2023
83c8900
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 28, 2023
ab91d94
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 30, 2023
8e074c0
chore: switch to using the migrated secret path for vault secrets
delanni Nov 29, 2023
950e7c9
chore: also use the secret path branching when writing secrets
delanni Nov 29, 2023
56e5756
chore: no need to change access in Jenkins vars
delanni Nov 30, 2023
c1ab1ed
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Nov 30, 2023
bdabe2a
log vault address to see which we're processing
delanni Nov 30, 2023
aa23c6b
chore: output pipeline instead of uploading - this is how the CI-syst…
delanni Nov 30, 2023
efd5aa3
chore: use secret paths without /migrated
delanni Dec 5, 2023
c9bf0a7
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Dec 5, 2023
2b746ea
chore: update recently added vault_get
delanni Dec 5, 2023
9788c42
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Dec 6, 2023
d56a978
chore: try to activate git mirrrors from a pipeline env var
delanni Dec 6, 2023
7216cbb
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Dec 7, 2023
c5b939d
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Dec 11, 2023
2c3c23c
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Dec 19, 2023
d7a5f6c
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Jan 4, 2024
6665495
chore: wip, rewrite agent targeting rules
delanni Jan 4, 2024
eda7873
chore: rewrite agent targeting rules
delanni Jan 4, 2024
921f305
chore: fix type error coming from boundary crossing
delanni Jan 4, 2024
3280495
Revert "chore: rewrite agent targeting rules"
delanni Jan 4, 2024
4aa89c0
chore: respect the buildPath prop when rewriting agent targeting
delanni Jan 4, 2024
444534d
chore: rewrite agent targeting rules 2
delanni Jan 4, 2024
047af99
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Jan 4, 2024
bb88119
chore: fix unit test - agents on the elastic buildkite infra will hav…
delanni Jan 8, 2024
208eed7
Revert "chore: rewrite agent targeting rules 2"
delanni Jan 8, 2024
9afa02b
chore: fix agent targeting rule regenerations
delanni Jan 8, 2024
11210e3
chore: rewrite agent targeting rules 3
delanni Jan 8, 2024
d235a9e
chore: increase machine type, maybe it gets more space
delanni Jan 8, 2024
fdd0927
chore: render gcloud credentials on pre-command
delanni Jan 9, 2024
3f98613
chore: activate privileged gcloud account with access to gcs buckets
delanni Jan 11, 2024
d841021
Revert "chore: rewrite agent targeting rules 3"
delanni Jan 11, 2024
c926cb3
tidy up agent rule rewriting
delanni Jan 11, 2024
d7c7341
chore: rewrite agent targeting rules 4
delanni Jan 11, 2024
0a84a4b
Revert "chore: rewrite agent targeting rules 4"
delanni Jan 11, 2024
89007fa
chore: make agent targeting rewrite up-to-date with dev branch
delanni Jan 11, 2024
0c17196
chore: rewrite agent targeting rules 5
delanni Jan 11, 2024
cb09d76
chore: activate service account before storybook upload
delanni Jan 11, 2024
c284bbb
empty
delanni Jan 12, 2024
0f41f75
Revert "chore: rewrite agent targeting rules 5"
delanni Jan 12, 2024
867c194
chore: add provider:gcp to all inlined rules
delanni Jan 12, 2024
7f28e2c
chore: rewrite agent targeting rules 6
delanni Jan 12, 2024
8f38f81
debug: add some exploratory logging, limit test to single config
delanni Jan 12, 2024
b72f383
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Jan 15, 2024
fa53cdc
remove failing listing command
delanni Jan 15, 2024
a352267
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Jan 16, 2024
933ec8a
chore: use kv store and corresponding kv paths on new agents
delanni Jan 15, 2024
bdc69c5
chore: print runners' gcloud identities
delanni Jan 29, 2024
d15c1ab
empty
delanni Jan 31, 2024
eb34aa0
add a few safety checks to prevent crashing whiel investigating gclou…
delanni Jan 31, 2024
745e385
add gcloud info section
delanni Jan 31, 2024
a045db8
empty
delanni Feb 1, 2024
edf6061
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Feb 2, 2024
3caf719
debug: add some debug logging before starting es
delanni Feb 6, 2024
b98ecd8
chore: more logging, less testing
delanni Feb 6, 2024
69900db
re-enable some tests, more adjustment to logging
delanni Feb 7, 2024
dcfd8a4
debug: prevent failure from listing
delanni Feb 7, 2024
b0bbe7f
remove inspections, let's see if the tests pass like this
delanni Feb 7, 2024
3cf621d
try to make copy-mode test agent agnostic
delanni Feb 7, 2024
5861598
re-enable ftr tests
delanni Feb 7, 2024
a7380aa
empty
delanni Feb 7, 2024
8012499
fix another mode-test failure
delanni Feb 8, 2024
56be069
re-enable other steps
delanni Feb 8, 2024
4a3c0fc
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Feb 8, 2024
24bd3b1
remove duplicate yaml-rewriting script (in favor of version in main)
delanni Feb 8, 2024
ce6f083
add missing provider:gcp to check types step
delanni Feb 20, 2024
838bb37
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Feb 20, 2024
db7f4e3
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Feb 21, 2024
b20458d
remove unnecessary lines around app credentials
delanni Feb 21, 2024
528c694
revert test changes to see if they run OK with umask 0x002 on the agent
delanni Feb 21, 2024
9db4b28
Merge branch 'main' into buildkite-on-elastic-ci-poc
delanni Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .buildkite/hooks/post-command
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/usr/bin/env bash

if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then
echo "Pipeline file triggered from outside the kibana executors, skipping post_command"
else
.buildkite/scripts/lifecycle/post_command.sh
fi
.buildkite/scripts/lifecycle/post_command.sh
9 changes: 3 additions & 6 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env bash

if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then
echo "Pipeline file triggered from outside the kibana executors, skipping .buildkite/scripts/lifecycle/pre_command.sh"
export SONAR_LOGIN=$(vault read -field=token secret/ci/elastic-kibana/sonarqube)
else
source .buildkite/scripts/lifecycle/pre_command.sh
fi
source .buildkite/scripts/lifecycle/pre_command.sh
export SONAR_LOGIN=$(vault read -field=token secret/ci/elastic-kibana/sonarqube)

8 changes: 7 additions & 1 deletion .buildkite/pipeline-utils/buildkite/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export interface BuildkiteCommandStep {
label: string;
parallelism?: number;
agents: {
queue: string;
queue?: string;
provider?: string;
image?: string;
imageProject?: string;
machineType?: string;
minCpuPlatform?: string;
preemptible?: boolean;
};
timeout_in_minutes?: number;
key?: string;
Expand Down
21 changes: 17 additions & 4 deletions .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,11 @@ export async function pickTestGroupRunOrder() {
timeout_in_minutes: 120,
key: 'jest',
agents: {
queue: 'n2-4-spot',
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-qa',
machineType: 'n2-standard-4',
preemptible: true,
},
retry: {
automatic: [
Expand All @@ -439,7 +443,11 @@ export async function pickTestGroupRunOrder() {
timeout_in_minutes: 120,
key: 'jest-integration',
agents: {
queue: 'n2-4-spot',
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-qa',
machineType: 'n2-standard-4',
preemptible: true,
},
retry: {
automatic: [
Expand Down Expand Up @@ -470,12 +478,17 @@ export async function pickTestGroupRunOrder() {
: -1
)
.map(
({ title, key, queue = defaultQueue }): BuildkiteStep => ({
// ({ title, key, queue = defaultQueue }): BuildkiteStep => ({
({ title, key }): BuildkiteStep => ({
label: title,
command: getRequiredEnv('FTR_CONFIGS_SCRIPT'),
timeout_in_minutes: 90,
agents: {
queue,
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-qa',
machineType: 'n2-standard-4',
preemptible: true,
},
env: {
FTR_CONFIG_GROUP_KEY: key,
Expand Down
81 changes: 72 additions & 9 deletions .buildkite/pipelines/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ steps:
- command: .buildkite/scripts/steps/artifacts/build.sh
label: Build Kibana Artifacts
agents:
queue: c2-16
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: c2-standard-16
buildDirectory: /dev/shm/builds
assignExternalIP: false
timeout_in_minutes: 60
retry:
automatic:
Expand All @@ -14,7 +19,13 @@ steps:
- command: TEST_PACKAGE=deb .buildkite/scripts/steps/package_testing/test.sh
label: Artifact Testing
agents:
queue: n2-4-virt
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
enableNestedVirtualization: true
localSsds: 1
machineType: n2-standard-4
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -24,7 +35,13 @@ steps:
- command: TEST_PACKAGE=rpm .buildkite/scripts/steps/package_testing/test.sh
label: Artifact Testing
agents:
queue: n2-4-virt
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
enableNestedVirtualization: true
localSsds: 1
machineType: n2-standard-4
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -34,7 +51,13 @@ steps:
- command: TEST_PACKAGE=docker .buildkite/scripts/steps/package_testing/test.sh
label: Artifact Testing
agents:
queue: n2-4-virt
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
enableNestedVirtualization: true
localSsds: 1
machineType: n2-standard-4
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -44,7 +67,27 @@ steps:
- command: KIBANA_DOCKER_CONTEXT=default .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
queue: n2-2
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '*'
limit: 1

- command: KIBANA_DOCKER_CONTEXT=ubi8 .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -54,7 +97,12 @@ steps:
- command: KIBANA_DOCKER_CONTEXT=ubi .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
queue: n2-2
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -64,7 +112,12 @@ steps:
- command: KIBANA_DOCKER_CONTEXT=ironbank .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
queue: n2-2
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -77,7 +130,12 @@ steps:
- exit_status: 255
- exit_status: -1
agents:
queue: n2-2
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 60
if: "build.env('RELEASE_BUILD') == null || build.env('RELEASE_BUILD') == '' || build.env('RELEASE_BUILD') == 'false'"
retry:
Expand All @@ -99,5 +157,10 @@ steps:
- command: .buildkite/scripts/steps/artifacts/publish.sh
label: 'Publish Kibana Artifacts'
agents:
queue: n2-2
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 30
7 changes: 6 additions & 1 deletion .buildkite/pipelines/artifacts_container_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ steps:
- command: .buildkite/scripts/steps/artifacts/docker_image.sh
label: Build serverless container images
agents:
queue: n2-16-spot
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-16
preemptible: true
buildDirectory: /dev/shm/builds
timeout_in_minutes: 60
retry:
automatic:
Expand Down
6 changes: 5 additions & 1 deletion .buildkite/pipelines/artifacts_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ steps:
- command: .buildkite/scripts/steps/artifacts/trigger.sh
label: Trigger artifacts build
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 10
6 changes: 5 additions & 1 deletion .buildkite/pipelines/bazel_cache.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
steps:
- label: ':pipeline: Create pipeline with priority'
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
concurrency_group: bazel_macos
concurrency: 1
concurrency_method: eager
Expand Down
6 changes: 5 additions & 1 deletion .buildkite/pipelines/build_api_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ steps:
- command: .buildkite/scripts/steps/build_api_docs.sh
label: 'Build API Docs'
agents:
queue: n2-4-spot
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-4
preemptible: true
key: build_api_docs
timeout_in_minutes: 60
retry:
Expand Down
18 changes: 15 additions & 3 deletions .buildkite/pipelines/code_coverage/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ steps:
label: Pre-Build
timeout_in_minutes: 10
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false

- wait

- command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
label: 'Pick Test Group Run Order'
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
timeout_in_minutes: 10
env:
FTR_CONFIGS_DEPS: ''
Expand All @@ -21,7 +29,11 @@ steps:
- command: .buildkite/scripts/steps/code_coverage/ingest.sh
label: 'Merge and Ingest'
agents:
queue: n2-4-spot
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-4
preemptible: true
depends_on:
- jest
- jest-integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
# BUILDKITE_COMMIT: the commit hash of the kibana branch to test

agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false

steps:
- label: "Annotate runtime parameters"
Expand All @@ -26,7 +30,11 @@ steps:
key: pre-build
timeout_in_minutes: 10
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false

- label: "Build Kibana Distribution and Plugins"
command: .buildkite/scripts/steps/build_kibana.sh
Expand All @@ -43,7 +51,11 @@ steps:
- label: "Pick Test Group Run Order"
command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
depends_on: build
timeout_in_minutes: 10
env:
Expand Down Expand Up @@ -197,4 +209,8 @@ steps:
command: .buildkite/scripts/lifecycle/post_build.sh
timeout_in_minutes: 10
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
7 changes: 6 additions & 1 deletion .buildkite/pipelines/es_snapshots/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ steps:
label: Build ES Snapshot
timeout_in_minutes: 30
agents:
queue: c2-8
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
localSsds: 1
machineType: c2-standard-8
assignExternalIP: false
6 changes: 5 additions & 1 deletion .buildkite/pipelines/es_snapshots/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ steps:
- label: Promote Snapshot
command: .buildkite/scripts/steps/es_snapshots/promote.sh
agents:
queue: kibana-default
provider: gcp
image: family/kibana-ubuntu-2004
imageProject: elastic-images-qa
machineType: n2-standard-2
assignExternalIP: false
Loading