Skip to content

Commit

Permalink
Merge branch 'main' into fix/tls-alert-flaky-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Apr 14, 2022
2 parents bd6905b + 4aedd6c commit 08bc756
Show file tree
Hide file tree
Showing 924 changed files with 99,348 additions and 70,329 deletions.
55 changes: 47 additions & 8 deletions .buildkite/pipelines/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,68 @@ steps:
agents:
queue: c2-16
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '*'
limit: 1

- wait

- command: TEST_PACKAGE=deb .buildkite/scripts/steps/package_testing/test.sh
label: Package testing for deb
label: Artifact Testing
agents:
queue: n2-4-virt
timeout_in_minutes: 20
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '*'
limit: 1

- command: TEST_PACKAGE=rpm .buildkite/scripts/steps/package_testing/test.sh
label: Package testing for rpm
label: Artifact Testing
agents:
queue: n2-4-virt
timeout_in_minutes: 20
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '*'
limit: 1

- command: TEST_PACKAGE=docker .buildkite/scripts/steps/package_testing/test.sh
label: Package testing for docker
label: Artifact Testing
agents:
queue: n2-4-virt
timeout_in_minutes: 20
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Build Context'
label: 'Docker Context Verification'
agents:
queue: n2-2
timeout_in_minutes: 20
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/artifacts/cloud.sh
label: 'Cloud Deployment'
agents:
queue: n2-2
timeout_in_minutes: 30
if: "build.env('RELEASE_BUILD') == null || build.env('RELEASE_BUILD') == '' || build.env('RELEASE_BUILD') == 'false'"
retry:
automatic:
- exit_status: '*'
limit: 1

- wait

- command: .buildkite/scripts/steps/artifacts/publish.sh
label: 'Publish Kibana Artifacts'
agents:
queue: n2-2
timeout_in_minutes: 30
14 changes: 1 addition & 13 deletions .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ steps:

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4
depends_on: build
Expand All @@ -40,18 +40,6 @@ steps:
- exit_status: '*'
limit: 1

- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/pipelines/flaky_tests/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"name": "Fleet - Cypress"
},
{
"key": "xpack/cigroup",
"name": "Default CI Group",
"ciGroups": 27
"key": "xpack/cypress/apm_cypress",
"name": "APM - Cypress"
},
{
"key": "xpack/cigroup/Docker",
"name": "Default CI Group Docker"
"key": "xpack/cigroup",
"name": "Default CI Group",
"ciGroups": 29
},
{
"key": "xpack/firefox",
Expand Down
16 changes: 1 addition & 15 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ steps:

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4-spot
depends_on: build
Expand All @@ -64,20 +64,6 @@ steps:
- exit_status: '*'
limit: 1

- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11
Expand Down
50 changes: 34 additions & 16 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4
depends_on: build
Expand All @@ -28,28 +28,18 @@ steps:
- exit_status: '*'
limit: 1

- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11
agents:
queue: ci-group-4d
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
key: oss-cigroup
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -61,6 +51,8 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -72,6 +64,8 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -83,6 +77,8 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -94,6 +90,8 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -105,6 +103,8 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

Expand All @@ -116,31 +116,45 @@ steps:
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/test/jest.sh
label: 'Jest Tests'
parallelism: 8
agents:
queue: n2-4
queue: n2-4-spot
timeout_in_minutes: 90
key: jest
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/test/jest_integration.sh
label: 'Jest Integration Tests'
parallelism: 3
agents:
queue: n2-4
queue: n2-4-spot
timeout_in_minutes: 120
key: jest-integration
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/test/api_integration.sh
label: 'API Integration Tests'
agents:
queue: n2-2-spot
timeout_in_minutes: 120
key: api-integration
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
Expand Down Expand Up @@ -176,6 +190,10 @@ steps:
queue: n2-4-spot
key: build_api_docs
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/webpack_bundle_analyzer/build_and_upload.sh
label: 'Build Webpack Bundle Analyzer reports'
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/response_ops.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/response_ops_cases.sh
label: 'Cases Cypress Tests on Security Solution'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
8 changes: 7 additions & 1 deletion .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const uploadPipeline = (pipelineContent) => {
if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/test\/security_solution_cypress/,
Expand All @@ -77,6 +76,13 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
}

if (
(await doAnyChangesMatch([/^x-pack\/plugins\/cases/])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/response_ops.yml'));
}

if (
(await doAnyChangesMatch([/^x-pack\/plugins\/apm/])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
Expand Down
44 changes: 7 additions & 37 deletions .buildkite/scripts/steps/artifacts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,14 @@ set -euo pipefail

.buildkite/scripts/bootstrap.sh

if [[ "${RELEASE_BUILD:-}" == "true" ]]; then
VERSION="$(jq -r '.version' package.json)"
RELEASE_ARG="--release"
else
VERSION="$(jq -r '.version' package.json)-SNAPSHOT"
RELEASE_ARG=""
fi
source .buildkite/scripts/steps/artifacts/env.sh

echo "--- Build Kibana Distribution"
node scripts/build "$RELEASE_ARG" --all-platforms --debug --docker-cross-compile --skip-docker-cloud

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$VERSION.csv"

# Release verification
if [[ "${RELEASE_BUILD:-}" == "true" ]]; then
echo "--- Build and push Kibana Cloud Distribution"
# This doesn't meet the requirements for a release image, implementation TBD
# Beats artifacts will need to match a specific commit sha that matches other stack iamges
# For now this is a placeholder step that will allow us to run automated Cloud tests
# against a best guess approximation of a release image
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT

node scripts/build \
"$RELEASE_ARG" \
--skip-initialize \
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--docker-images \
--docker-tag-qualifier="$GIT_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-contexts
fi
echo "--- Build Kibana artifacts"
node scripts/build --all-platforms --debug --docker-cross-compile $(echo "$BUILD_ARGS")

echo "--- Build and upload dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$FULL_VERSION.csv"
cd target
sha512sum "dependencies-$FULL_VERSION.csv" > "dependencies-$FULL_VERSION.csv.sha512.txt"
buildkite-agent artifact upload "*"
cd -
cd -
Loading

0 comments on commit 08bc756

Please sign in to comment.