Skip to content

Commit

Permalink
Merge branch 'main' into fix/olm-revisit_blocklist_list_labels-3237
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokaditya authored Apr 4, 2022
2 parents 581bcd7 + 158c617 commit 00984d4
Show file tree
Hide file tree
Showing 926 changed files with 38,630 additions and 19,798 deletions.
24 changes: 24 additions & 0 deletions .buildkite/scripts/steps/artifacts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,27 @@ node scripts/build "$RELEASE_ARG" --all-platforms --debug --docker-cross-compile

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$VERSION.csv"

# Release verification
if [[ "${RELEASE_BUILD:-}" == "true" ]]; then
echo "--- Build and push Kibana Cloud Distribution"
# This doesn't meet the requirements for a release image, implementation TBD
# Beats artifacts will need to match a specific commit sha that matches other stack iamges
# For now this is a placeholder step that will allow us to run automated Cloud tests
# against a best guess approximation of a release image
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT

node scripts/build \
"$RELEASE_ARG" \
--skip-initialize \
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--docker-images \
--docker-tag-qualifier="$GIT_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-contexts
fi
18 changes: 17 additions & 1 deletion .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ echo "--- Build Elasticsearch"
:distribution:archives:darwin-aarch64-tar:assemble \
:distribution:archives:darwin-tar:assemble \
:distribution:docker:docker-export:assemble \
:distribution:docker:cloud-docker-export:assemble \
:distribution:archives:linux-aarch64-tar:assemble \
:distribution:archives:linux-tar:assemble \
:distribution:archives:windows-zip:assemble \
Expand All @@ -79,11 +80,26 @@ find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elas

ls -alh "$destination"

echo "--- Create docker image archives"
echo "--- Create docker default image archives"
docker images "docker.elastic.co/elasticsearch/elasticsearch"
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 echo 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz'
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz'

echo "--- Create kibana-ci docker cloud image archives"
ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}")
ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}")
KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT"
KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION"

docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE"

echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT
docker image push "$KIBANA_ES_CLOUD_IMAGE"

export ELASTICSEARCH_CLOUD_IMAGE="$KIBANA_ES_CLOUD_IMAGE"
export ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM="$(docker images "$KIBANA_ES_CLOUD_IMAGE" --format "{{.Digest}}")"

echo "--- Create checksums for snapshot files"
cd "$destination"
find ./* -exec bash -c "shasum -a 512 {} > {}.sha512" \;
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/es_snapshots/create_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const { BASE_BUCKET_DAILY } = require('./bucket_config.js');
const destination = process.argv[2] || __dirname + '/test';

const ES_BRANCH = process.env.ELASTICSEARCH_BRANCH;
const ES_CLOUD_IMAGE = process.env.ELASTICSEARCH_CLOUD_IMAGE;
const ES_CLOUD_IMAGE_CHECKSUM = process.env.ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM;
const GIT_COMMIT = process.env.ELASTICSEARCH_GIT_COMMIT;
const GIT_COMMIT_SHORT = process.env.ELASTICSEARCH_GIT_COMMIT_SHORT;

Expand Down Expand Up @@ -59,6 +61,17 @@ const { BASE_BUCKET_DAILY } = require('./bucket_config.js');
};
});

if (ES_CLOUD_IMAGE && ES_CLOUD_IMAGE_CHECKSUM) {
manifestEntries.push({
checksum: ES_CLOUD_IMAGE_CHECKSUM,
url: ES_CLOUD_IMAGE,
version: VERSION,
platform: 'docker',
architecture: 'image',
license: 'default',
});
}

const manifest = {
id: SNAPSHOT_ID,
bucket: `${BASE_BUCKET_DAILY}/${DESTINATION}`.toString(),
Expand Down
20 changes: 19 additions & 1 deletion .buildkite/scripts/steps/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ source .buildkite/scripts/common/util.sh
echo '--- Lint: stylelint'
checks-reporter-with-killswitch "Lint: stylelint" \
node scripts/stylelint
echo "stylelint ✅"

# disable "Exit immediately" mode so that we can run eslint, capture it's exit code, and respond appropriately
# after possibly commiting fixed files to the repo
set +e;

echo '--- Lint: eslint'
checks-reporter-with-killswitch "Lint: eslint" \
node scripts/eslint --no-cache
node scripts/eslint --no-cache --fix

eslint_exit=$?

# re-enable "Exit immediately" mode
set -e;

check_for_changed_files 'node scripts/eslint --no-cache --fix' true

if [[ "${eslint_exit}" != "0" ]]; then
exit 1
fi

echo "eslint ✅"
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exitCode=0
while read -r config; do
if [ "$((i % JOB_COUNT))" -eq "$JOB" ]; then
echo "--- $ node scripts/jest --config $config"
node --max-old-space-size=14336 ./node_modules/.bin/jest --config="$config" --runInBand --coverage=false --passWithNoTests
node --max-old-space-size=14336 ./scripts/jest --config="$config" --runInBand --coverage=false --passWithNoTests
lastCode=$?

if [ $lastCode -ne 0 ]; then
Expand Down
7 changes: 1 addition & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,7 @@ module.exports = {
* Licence headers
*/
{
files: [
'**/*.{js,mjs,ts,tsx}',
'!plugins/**/*',
'!packages/elastic-datemath/**/*',
'!packages/elastic-eslint-config-kibana/**/*',
],
files: ['**/*.{js,mjs,ts,tsx}'],
rules: {
'@kbn/eslint/require-license-header': [
'error',
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -482,5 +482,6 @@ x-pack/plugins/session_view @elastic/awp-platform

## Shared UX
/src/plugins/shared_ux/ @elastic/shared-ux
/packages/shared-ux-*/ @elastic/shared-ux
/src/plugins/kibana_react/ @elastic/shared-ux
/src/plugins/kibana_react/public/code_editor @elastic/kibana-presentation
/src/plugins/kibana_react/public/code_editor @elastic/shared-ux @elastic/kibana-presentation
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the actions plugin
date: 2022-03-28
date: 2022-03-30
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the advancedSettings plugin
date: 2022-03-28
date: 2022-03-30
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
Loading

0 comments on commit 00984d4

Please sign in to comment.