[8.x][ci] Run linting before tests (#197310) (#198096)

#197310
This commit is contained in:
Jon 2024-10-29 16:59:24 -05:00 committed by GitHub
parent 15aaea8d02
commit d3ccb92479
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 142 additions and 57 deletions

View file

@ -46,6 +46,36 @@ steps:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-16
preemptible: true
key: linting
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-32
preemptible: true
key: linting_with_types
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
- wait
- command: .buildkite/scripts/steps/on_merge_api_docs.sh
@ -109,6 +139,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:
@ -127,6 +159,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 4
retry:
@ -145,6 +179,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 6
retry:
@ -163,6 +199,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 5
retry:
@ -181,6 +219,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 6
retry:
@ -199,6 +239,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:
@ -217,6 +259,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:
@ -235,6 +279,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:
@ -253,6 +299,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 6
retry:
@ -271,6 +319,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 8
retry:
@ -291,6 +341,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 20
retry:
@ -304,42 +356,14 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-8
preemptible: true
key: linting
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-16
preemptible: true
key: linting_with_types
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
parallelism: 1 # TODO: Set parallelism when apm_cypress handles it
retry:

View file

@ -32,6 +32,30 @@ steps:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
machineType: n2-standard-16
preemptible: true
key: linting
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
machineType: n2-standard-32
preemptible: true
key: linting_with_types
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
- wait
- command: .buildkite/scripts/steps/ci_stats_ready.sh
@ -61,18 +85,6 @@ steps:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
machineType: n2-standard-8
preemptible: true
key: linting
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/check_types.sh
label: 'Check Types'
agents:
@ -85,18 +97,6 @@ steps:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
machineType: n2-standard-16
preemptible: true
key: linting_with_types
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
key: checks

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 30
soft_fail: true
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/exploratory_view/e2e/.journeys/**/*'

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
soft_fail: true
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 50
parallelism: 6
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
parallelism: 1
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 5
retry:
automatic:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
retry:
automatic:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
parallelism: 2
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
parallelism: 9
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 120
retry:
automatic:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:
@ -22,6 +24,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:

View file

@ -9,6 +9,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
soft_fail: true
parallelism: 1
@ -23,6 +25,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:
@ -37,6 +41,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 50
soft_fail: true
retry:

View file

@ -9,6 +9,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 20
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 5
retry:
@ -22,6 +24,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 7
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 8
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 1
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 4
retry:
@ -22,6 +24,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
parallelism: 2
retry:

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 30
artifact_paths:
- 'x-pack/plugins/observability_solution/slo/e2e/.journeys/**/*'

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'

View file

@ -7,6 +7,8 @@ steps:
depends_on:
- build
- quick_checks
- linting
- linting_with_types
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*'

View file

@ -1,4 +1,3 @@
.buildkite/scripts/steps/checks/precommit_hook.sh
.buildkite/scripts/steps/checks/ts_projects.sh
.buildkite/scripts/steps/checks/packages.sh
.buildkite/scripts/steps/checks/bazel_packages.sh

View file

@ -15,9 +15,9 @@ echo '--- Lint: eslint'
# after possibly commiting fixed files to the repo
set +e;
if is_pr && ! is_auto_commit_disabled; then
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 4 node scripts/eslint --no-cache --fix
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 8 node scripts/eslint --no-cache --fix
else
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 4 node scripts/eslint --no-cache
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 8 node scripts/eslint --no-cache
fi
eslint_exit=$?