mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[artifacts] Test cloud context (#130394)
* [artifacts] Test cloud context This artifact currently has no consumers, but in the near future the release-manager will produce Cloud images using the context. This ensures builds are working before we publish artifacts. * update permissions * fix if statement * DOCKER_CONTEXT -> KIBANA_DOCKER_CONTEXT
This commit is contained in:
parent
3f6df1a46f
commit
b16486a999
3 changed files with 30 additions and 3 deletions
|
@ -41,7 +41,17 @@ steps:
|
|||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/artifacts/docker_context.sh
|
||||
- command: KIBANA_DOCKER_CONTEXT=default .buildkite/scripts/steps/artifacts/docker_context.sh
|
||||
label: 'Docker Context Verification'
|
||||
agents:
|
||||
queue: n2-2
|
||||
timeout_in_minutes: 30
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: KIBANA_DOCKER_CONTEXT=cloud .buildkite/scripts/steps/artifacts/docker_context.sh
|
||||
label: 'Docker Context Verification'
|
||||
agents:
|
||||
queue: n2-2
|
||||
|
|
|
@ -24,3 +24,8 @@ buildkite-agent artifact upload "dependencies-$FULL_VERSION.csv"
|
|||
buildkite-agent artifact upload "dependencies-$FULL_VERSION.csv.sha512.txt"
|
||||
buildkite-agent artifact upload 'i18n/*.json'
|
||||
cd -
|
||||
|
||||
cd .beats
|
||||
buildkite-agent artifact upload 'metricbeat-*'
|
||||
buildkite-agent artifact upload 'filebeat-*'
|
||||
cd -
|
||||
|
|
16
.buildkite/scripts/steps/artifacts/docker_context.sh
Normal file → Executable file
16
.buildkite/scripts/steps/artifacts/docker_context.sh
Normal file → Executable file
|
@ -6,17 +6,29 @@ set -euo pipefail
|
|||
|
||||
source .buildkite/scripts/steps/artifacts/env.sh
|
||||
|
||||
KIBANA_DOCKER_CONTEXT="${KIBANA_DOCKER_CONTEXT:="default"}"
|
||||
|
||||
echo "--- Create contexts"
|
||||
mkdir -p target
|
||||
node scripts/build --skip-initialize --skip-generic-folders --skip-platform-folders --skip-archives --docker-context-use-local-artifact $(echo "$BUILD_ARGS")
|
||||
|
||||
echo "--- Setup default context"
|
||||
echo "--- Setup context"
|
||||
DOCKER_BUILD_FOLDER=$(mktemp -d)
|
||||
|
||||
tar -xf target/kibana-[0-9]*-docker-build-context.tar.gz -C "$DOCKER_BUILD_FOLDER"
|
||||
if [[ "$KIBANA_DOCKER_CONTEXT" == "default" ]]; then
|
||||
DOCKER_CONTEXT_FILE="kibana-$FULL_VERSION-docker-build-context.tar.gz"
|
||||
elif [[ "$KIBANA_DOCKER_CONTEXT" == "cloud" ]]; then
|
||||
DOCKER_CONTEXT_FILE="kibana-cloud-$FULL_VERSION-docker-build-context.tar.gz"
|
||||
fi
|
||||
|
||||
tar -xf "target/$DOCKER_CONTEXT_FILE" -C "$DOCKER_BUILD_FOLDER"
|
||||
cd $DOCKER_BUILD_FOLDER
|
||||
|
||||
buildkite-agent artifact download "kibana-$FULL_VERSION-linux-x86_64.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
|
||||
if [[ "$KIBANA_DOCKER_CONTEXT" == "cloud" ]]; then
|
||||
buildkite-agent artifact download "metricbeat-$FULL_VERSION-linux-x86_64.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
|
||||
buildkite-agent artifact download "filebeat-$FULL_VERSION-linux-x86_64.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
|
||||
fi
|
||||
|
||||
echo "--- Build context"
|
||||
docker build .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue