-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
…e-offset
- Loading branch information
Showing
183 changed files
with
8,506 additions
and
2,336 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/groovy | ||
library 'kibana-pipeline-library' | ||
kibanaLibrary.load() | ||
kibanaPipeline(timeoutMinutes: 300) { | ||
slackNotifications.onFailure { | ||
ciStats.trackBuild { | ||
workers.ci(ramDisk: false, name: "package-build", size: 'l', runErrorReporter: false) { | ||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') { | ||
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_build.sh", "Package builds") | ||
} | ||
} | ||
def packageTypes = ['deb', 'docker', 'rpm'] | ||
def workers = [:] | ||
packageTypes.each { type -> | ||
workers["package-${type}"] = { | ||
testPackage(type) | ||
} | ||
} | ||
parallel(workers) | ||
} | ||
} | ||
} | ||
def testPackage(packageType) { | ||
workers.ci(ramDisk: false, name: "package-${packageType}", size: 's', runErrorReporter: false) { | ||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') { | ||
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_${packageType}.sh", "Execute package testing for ${packageType}") | ||
} | ||
} | ||
} |
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
64 changes: 64 additions & 0 deletions
64
docs/developer/contributing/development-package-tests.asciidoc
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,64 @@ | ||
[[development-package-tests]] | ||
== Package Testing | ||
|
||
Packaging tests use Vagrant virtual machines as hosts and Ansible for | ||
provisioning and assertions. Kibana distributions are copied from the | ||
target folder into each VM and installed, along with required | ||
dependencies. | ||
|
||
=== Setup | ||
|
||
* https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html[Ansible] | ||
+ | ||
``` | ||
# Ubuntu | ||
sudo apt-get install python3-pip libarchive-tools | ||
pip3 install --user ansible | ||
|
||
# Darwin | ||
brew install python3 | ||
pip3 install --user ansible | ||
``` | ||
* https://www.vagrantup.com/downloads[Vagrant] | ||
* https://www.virtualbox.org/wiki/Downloads[Virtualbox] | ||
|
||
=== Machines | ||
|
||
[cols=",,",options="header",] | ||
|=== | ||
|Hostname |IP |Description | ||
|deb |192.168.50.5 |Installation of Kibana’s deb package | ||
|rpm |192.168.50.6 |Installation of Kibana’s rpm package | ||
|docker |192.168.50.7 |Installation of Kibana’s docker image | ||
|=== | ||
|
||
=== Running | ||
|
||
``` | ||
# Build distributions | ||
node scripts/build --all-platforms --debug --no-oss | ||
|
||
cd test/package | ||
|
||
# Setup virtual machine and networking | ||
vagrant up <hostname> --no-provision | ||
|
||
# Install Kibana and run OS level tests | ||
# This step can be repeated when adding new tests, it ensures machine state - installations won't run twice | ||
vagrant provision <hostname> | ||
|
||
# Running functional tests | ||
node scripts/es snapshot \ | ||
-E network.bind_host=127.0.0.1,192.168.50.1 \ | ||
-E discovery.type=single-node \ | ||
--license=trial | ||
TEST_KIBANA_URL=http://elastic:changeme@<ip>:5601 \ | ||
TEST_ES_URL=http://elastic:changeme@192.168.50.1:9200 \ | ||
node scripts/functional_test_runner.js --include-tag=smoke | ||
``` | ||
|
||
=== Cleanup | ||
|
||
.... | ||
vagrant destroy <hostname> | ||
.... |
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
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
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
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,108 @@ | ||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") | ||
load("@npm//webpack-cli:index.bzl", webpack = "webpack_cli") | ||
|
||
PKG_BASE_NAME = "kbn-monaco" | ||
PKG_REQUIRE_NAME = "@kbn/monaco" | ||
|
||
SOURCE_FILES = glob( | ||
[ | ||
"src/**/*", | ||
], | ||
exclude = [ | ||
"**/*.test.*", | ||
"**/README.md", | ||
], | ||
) | ||
|
||
SRCS = SOURCE_FILES | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = SRCS, | ||
) | ||
|
||
NPM_MODULE_EXTRA_FILES = [ | ||
"package.json", | ||
"README.md" | ||
] | ||
|
||
SRC_DEPS = [ | ||
"//packages/kbn-babel-preset", | ||
"//packages/kbn-i18n", | ||
"@npm//antlr4ts", | ||
"@npm//babel-loader", | ||
"@npm//monaco-editor", | ||
"@npm//raw-loader", | ||
"@npm//regenerator-runtime", | ||
] | ||
|
||
TYPES_DEPS = [ | ||
"@npm//@types/jest", | ||
"@npm//@types/node", | ||
] | ||
|
||
DEPS = SRC_DEPS + TYPES_DEPS | ||
|
||
webpack( | ||
name = "target_web", | ||
data = DEPS + [ | ||
":src", | ||
":webpack.config.js", | ||
], | ||
output_dir = True, | ||
args = [ | ||
"--config", | ||
"$(location webpack.config.js)", | ||
"--output-path", | ||
"$(@D)", | ||
"--env.prod", | ||
"--display=minimal" | ||
], | ||
) | ||
|
||
ts_config( | ||
name = "tsconfig", | ||
src = "tsconfig.json", | ||
deps = [ | ||
"//:tsconfig.base.json", | ||
], | ||
) | ||
|
||
ts_project( | ||
name = "tsc", | ||
args = ['--pretty'], | ||
srcs = SRCS, | ||
deps = DEPS, | ||
declaration = True, | ||
declaration_dir = "target_types", | ||
declaration_map = True, | ||
incremental = True, | ||
out_dir = "target_node", | ||
source_map = True, | ||
root_dir = ".", | ||
tsconfig = ":tsconfig", | ||
) | ||
|
||
js_library( | ||
name = PKG_BASE_NAME, | ||
srcs = NPM_MODULE_EXTRA_FILES, | ||
deps = DEPS + [":target_web", ":tsc"], | ||
package_name = PKG_REQUIRE_NAME, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm( | ||
name = "npm_module", | ||
deps = [ | ||
":%s" % PKG_BASE_NAME, | ||
] | ||
) | ||
|
||
filegroup( | ||
name = "build", | ||
srcs = [ | ||
":npm_module", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
Oops, something went wrong.