mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ci] Add support for label ci:build-serverless-image
(#161583)
Adding the label `ci:build-serverless-image` will build and push the serverless image to our registry. The url will be available as an annotation at the top of Buildkite Closes https://github.com/elastic/kibana/issues/161562
This commit is contained in:
parent
32b06938be
commit
9ab807796c
1 changed files with 26 additions and 0 deletions
|
@ -41,6 +41,32 @@ if is_pr_with_label "ci:build-cloud-image"; then
|
|||
EOF
|
||||
fi
|
||||
|
||||
if is_pr_with_label "ci:build-serverless-image"; then
|
||||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
|
||||
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
|
||||
node scripts/build \
|
||||
--skip-initialize \
|
||||
--skip-generic-folders \
|
||||
--skip-platform-folders \
|
||||
--skip-archives \
|
||||
--docker-images \
|
||||
--docker-namespace="kibana-ci" \
|
||||
--docker-tag="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT" \
|
||||
--docker-push \
|
||||
--skip-docker-ubi \
|
||||
--skip-docker-ubuntu \
|
||||
--skip-docker-cloud \
|
||||
--skip-docker-contexts
|
||||
docker logout docker.elastic.co
|
||||
|
||||
SERVERLESS_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-serverless)
|
||||
buildkite-agent meta-data set pr_comment:deploy_cloud:head "* Kibana Serverless Image: \`$SERVERLESS_IMAGE\`"
|
||||
cat << EOF | buildkite-agent annotate --style "info" --context kibana-serverless-image
|
||||
|
||||
Kibana Serverless Image: \`$SERVERLESS_IMAGE\`
|
||||
EOF
|
||||
fi
|
||||
|
||||
echo "--- Archive Kibana Distribution"
|
||||
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
|
||||
installDir="$KIBANA_DIR/install/kibana"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue