mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [artifacts] Merge docker context verification * add to pipeline * n2-2
This commit is contained in:
parent
aae38b447b
commit
1d65401084
2 changed files with 34 additions and 0 deletions
|
@ -24,3 +24,9 @@ steps:
|
|||
agents:
|
||||
queue: n2-4-virt
|
||||
timeout_in_minutes: 20
|
||||
|
||||
- command: .buildkite/scripts/steps/artifacts/docker_context.sh
|
||||
label: 'Docker Build Context'
|
||||
agents:
|
||||
queue: n2-2
|
||||
timeout_in_minutes: 20
|
||||
|
|
28
.buildkite/scripts/steps/artifacts/docker_context.sh
Normal file
28
.buildkite/scripts/steps/artifacts/docker_context.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
echo "--- Create contexts"
|
||||
mkdir -p target
|
||||
node scripts/build "$RELEASE_ARG" --skip-initialize --skip-generic-folders --skip-platform-folders --skip-archives --docker-context-use-local-artifact
|
||||
|
||||
echo "--- Setup default context"
|
||||
DOCKER_BUILD_FOLDER=$(mktemp -d)
|
||||
|
||||
tar -xf target/kibana-[0-9]*-docker-build-context.tar.gz -C "$DOCKER_BUILD_FOLDER"
|
||||
cd $DOCKER_BUILD_FOLDER
|
||||
|
||||
buildkite-agent artifact download "kibana-$VERSION-linux-x86_64.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
|
||||
|
||||
echo "--- Build context"
|
||||
docker build .
|
Loading…
Add table
Add a link
Reference in a new issue