[ci/project-deploy] Run more checks before deploying (#183058)

This splits the project build and deploy steps into two: build the
container image, and then deploy. This will allow us to build the
project image in parallel with other checks, and deploy later after a
smoke test is completed. Currently this uses static checks of:
- project image build
- linting
- lint with types
- checks
- type check

Time to project deployment is expected to be ~5~ 1 minute longer. If
needed we can expand to functional tests, but in the interim this should
cover the issue we saw in https://github.com/elastic/kibana/pull/180309.
This commit is contained in:
Jon 2024-05-10 06:33:33 -05:00 committed by GitHub
parent 99813cff15
commit 240b54180a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

View file

@ -74,6 +74,7 @@ steps:
label: 'Check Types'
agents:
queue: n2-4-spot
key: check_types
timeout_in_minutes: 60
retry:
automatic:
@ -93,6 +94,7 @@ steps:
- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
key: checks
agents:
queue: n2-2-spot
timeout_in_minutes: 60

View file

@ -1,6 +1,7 @@
steps:
- command: .buildkite/scripts/steps/serverless/build_and_deploy.sh
label: 'Build and Deploy Project'
- command: .buildkite/scripts/steps/artifacts/docker_image.sh
label: 'Build Project Image'
key: build_project_image
agents:
queue: n2-16-spot
timeout_in_minutes: 60
@ -9,3 +10,15 @@ steps:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/serverless/deploy.sh
label: 'Deploy Project'
agents:
queue: kibana-default
timeout_in_minutes: 10
depends_on:
- build_project_image
- linting
- linting_with_types
- checks
- check_types
soft_fail: true

View file

@ -4,8 +4,8 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh
source .buildkite/scripts/steps/artifacts/docker_image.sh
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:pr-$BUILDKITE_PULL_REQUEST-${BUILDKITE_COMMIT:0:12}"
deploy() {
PROJECT_TYPE=$1