-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [artifacts] Merge docker context verification * add to pipeline * n2-2 (cherry picked from commit b2b961e) Co-authored-by: Jonathan Budzenski <[email protected]>
- Loading branch information
1 parent
a4feb95
commit 998f95f
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |