Commit graph

71 commits

Author SHA1 Message Date
Spencer 65a31173c2
[7.x] Call failure reporter directly from Jenkinsfile (#45551) (#45668)
* Run failed_tests/cli once per node

* force failures for testing

* Revert "force failures for testing"

This reverts commit 3ddd9240fe.
2019-09-13 13:43:48 -07:00
Spencer 5fc3d0639f Revert "Revert "Revert "Revert "[ci] compress jobs for CI stab… (#45454)
* Revert "Revert "Revert "Revert "[ci] compress jobs for CI stability" (#44584)"""

This reverts commit 148b8c0f90.

* sync changes with Jenkinsfile

(cherry picked from commit 9a109f2170)
2019-09-11 15:28:14 -07:00
Brian Seeders 17670959dc Jenkins pipeline with parallel cigroups (#45285)
* Pipeline

* WIP some work for parallelization with ciGroups

* Fix xpack kibana install dir, and add some debugging

* Attempt to quick fix a few tests

* Revert "Revert "Revert "[ci] compress jobs for CI stability" (#44584)""

This reverts commit 078ac2897f.

* Recombine test groups, and try runbld again

* Mostly cleanup, and fix failed_tests reporting to hopefully work for both pipeline and non-pipeline

* Fix typo in shell script

* Remove some debug code

* Add support for changing es transport.port during testing via TEST_ES_TRANSPORT_PORT

* Fix test that uses hard-coded es transport port and add it back in to parallel groups

* Disable checks reporter again for now

* Set env var for TEST_ES_TRANSPORT_PORT in pipeline

* Update Jenkinsfile for shorter testrunner labels

* Fix another hard-coded transport port

* Fix a new test with hard-coded URLs

* Jenkinsfile cleanup and fix one of the groups

* Fix double slash

* Testing vault credentials on jenkins server

* Add a non-existent credential

* Revert "Add a non-existent credential"

This reverts commit 0dc234c465a5483b1a994cb510a182fef766e9cc.

* Try github-checks-reporter again

* github-checks-reporter should only run for elastic/kibana, forks won't work

* Clean up some debug code

* Changing names around to try to make BlueOcean UI a little better

* Add more stages

* Make some changes to stage structure to mirror a nested example from CloudBees

* Handle TODOs, and some cleanup in Jenkinsfile

* Pass GIT_BRANCH when started without GHPRB, fix branch check

* Fix mailer problem and add code that ensures all tests are in cigroups back in

* Test adding worker/job name to junit report paths

* Remove some duplication from ci_setup scripts

* Fix unit test that uses junit path

* Don't reinstall node every time setup_env is run

* Fix yarn install logic

* Fix another unit test that uses junit output dir

* Download latest ES snapshot after kibana builds

* Make sure junit reports are always processed

* Add two failing tests for testing purposes

* Add support to Jenkinsfile for kibana build e-mails

* Remove some debug code for email sending

* Change JOB env handling in junit paths and move it to a sub-directory

* Revert "Add two failing tests for testing purposes"

This reverts commit 5715203e26922a93483feb0ebb8bb3fdcc3daf8c.

* Fix junit report path in test

* Don't send kibana emails on build abort

* Address PR feedback, formatting and use built-in url formatting library

* Fix path formatting for functional test

* Add email sending back in to Jenkinsfile

* Fix another unit test with path problem

(cherry picked from commit 27d23c4184)

# Conflicts:
#	src/dev/ci_setup/setup.sh
#	src/dev/failed_tests/cli.js
2019-09-11 12:23:33 -07:00
spalger d2235c6e6e disable jest suite that has no enabled tests (#44250)
(cherry picked from commit 61e1b83722)
2019-09-10 17:54:18 -07:00
spalger 65003f0cbc Revert "Revert "[ci] compress jobs for CI stability" (#44584) (#44673)"
This reverts commit 2584383be1.
2019-09-10 09:04:36 -07:00
Spencer 2584383be1
Revert "[ci] compress jobs for CI stability" (#44584) (#44673)
This reverts commit debf8c62b4.
2019-09-03 12:25:06 -07:00
Spencer 408bf82284
[ci] compress jobs for CI stability (#44353)
# Conflicts:
#	x-pack/test/functional/apps/dashboard_mode/index.js
#	x-pack/test/upgrade_assistant_integration/upgrade_assistant/index.js
2019-08-29 05:10:13 -07:00
Nicolas Chaulet badf663aa9
[Tests] Setup contract tests in x-pack (#42345) (#42613) 2019-08-05 13:28:03 -04:00
Court Ewing a973cbc7a9 Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
Dmitry Lemeshko bc1234a9be
[firefox] Run functional tests in dedicated CI groups (#38416) (#39089)
* 2 jobs for Firefox tests

* review fixes

* make sh files executable

* add check reporter
2019-06-17 21:30:29 +03:00
Spencer 4cfdda4150 [percy] only execute percy setup when necessary (#39043)
(cherry picked from commit 9c1bdb9298)
2019-06-16 07:24:17 -07:00
liza-mae 9ce96bc567
[WIP] FTR Percy changes (#36897) (#38996)
* [ftr/percy] integrate percy with functional test runner

* execute ftr within `percy exec`

* share PERCY_BIN and GRUNT_BIN vars in setup

* [license] whitelist `(Unlicense OR Apache-2.0)`

* [percy] include pr/parallel info in env

* echo the actual variable value

* destructure required modules

* [ci] calculate percy env in a script

* remove outdated eslint overrides

* oops, nonce should be the same for each build

* take snapshots in context tests

* add percy snapshots to some dashboard tests

* account for extra execution of PERCY_BIN

* remove usage of percy service

* rename service to `visualTesting`

* write a simple test

* switch left-over percy test to visualTesting

* set log level for percy agent

* trigger ci

* try using the system chrome install instead of downloading one

* fix export definition

* Don't skip chromium download

* Add Spencer's fix to point to chrome installation

* Attempting to split tests into own ci job and test files

* Renumber job

* Add tag to decorations file

* Try new files with existing CI job

* Try again to create a new CI job

* Fix eslint problem with space

* eslint updates

* fix console test

* make test names unique

* Update ci group names

* Try old name again

* save

* add separate visual_regression ci job

* add visual regression ci job

* add new job to jobs.yml

* update path to take_percy_snapshot script

* use fixed percy job total

* fix common services import

* move visual_create_and_add_embeddables to visual_regression project

* finish moving create_and_add_embeddables

* add x-pack visual regression job

* migrate dashboard_snapshots tests to visual_regression

* remove references to removed test files

* restore some unnecessary changes

* reimplement the login page tests

* yarn.lock update

* fix test

* remove old CI_GROUP 100 block

* update failed_tests trap

* reduce yarn.lock changes

* disable debug logging

* disable visual-regression tests for now, we can enable them in specific prs
2019-06-14 12:16:48 -06:00
Spencer 238d24f38e
[7.x] [testFailureReporting] only run on master/version jobs (#38497) (#38547) 2019-06-10 08:35:08 -07:00
Frank Hassanabad d27c46454b
[SIEM] Add build step to find cyclic deps in SIEM project (#38329) (#38473)
* Adds a build step to find cyclic deps and error out in the SIEM project when found as part of a build step.

* Fixes typescript files that have cycles with their constants and types.

You run this like so:

```
cd kibana/x-pack/plugins/siem
node scripts/check_circular_deps.js
```

And get this message:
<img width="846" alt="Screen Shot 2019-06-07 at 11 22 24 AM" src="https://user-images.githubusercontent.com/1151048/59121970-b629f680-8916-11e9-8683-326a881c4725.png">

Or you will get an error with a listing of deps that need to be updated which have cycles in them.

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-06-07 17:16:33 -06:00
Spencer 6836237898
[7.x] [jest] don't be crazy, run with caching enabled (#38332) (#38349) 2019-06-06 17:56:27 -07:00
spalger c7a65def48 [ci] disable firefox tests
(cherry picked from commit c655a11ece)
2019-06-06 14:29:27 -07:00
Spencer 7aea62aa61
[7.x] FTR: add support for Firefox browser (#32509) (#37750)
* skip and adjust functional tests for Firefox

* downgrade geckodriver to 0.22.0

* [ftr] add firefox specific config file

* remove hard coded firefox adjustments

* remove firefox specific screenshot directory

* run functional tests in firefox in x-pack

* pass the logger to readConfigFile()

* rename local var

* skip xpack firefox config

* run xpack firefox functional tests in separate command

* update report name for XPack firefox results

* adjust viz shared item test

* skip shared item test

* [test/feature_controls] increase timeout to 20 sec & use forceLogout

* FF timeout on TSVB, refresh page on failure for url navigation

* [feature_controls/visualize_security] increase timeout to 20 sec

* skip dev_tools_spaces tests on FF

* run all groups 3 times

* skip more func tests

* skip more tests

* skip all feature controls tests for Firefox

* revert back changes in feature controls tests

* rename xpack report for chrome

* skip tile map for FF, wait for render before saving

* Revert "run all groups 3 times"

This reverts commit 12b4f69627.

* revert refresh on login

* apply feedback
2019-05-31 17:18:31 -07:00
Lee Drengenberg cf0dd0bf54
[7.x] Split ciGroup3 and ciGroup5 (#36928) (#37122)
* Split ciGroup3 and ciGroup5 (#36928)

* split large x-pack ciGroup5 into 3 groups

* split large x-pack ciGroup3 into 2 groups

* Add groups to the jenkins xpack ci group file

* Re-level some more work

* move es_search_source test to new describe block

* move es_search_source to first in ciGroup7

* move to x-pack-ciGroup6
2019-05-24 17:35:22 -05:00
Matthew Kime f373ab974c
implementing github checks - second attempt (#35757) (#35906)
implement github checks in ci
2019-05-01 19:53:02 -05:00
spalger 47840b9d5b Revert "merge (#35377)"
This reverts commit fdd9e90fb3.
2019-04-23 15:48:23 -07:00
Matthew Kime fdd9e90fb3
merge (#35377) 2019-04-19 18:08:04 -05:00
Stacey Gammon ad60c228f8
Typescript sample panel action (#33602) (#33871)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 16:45:53 -04:00
Peter Pisljar a0a1b594c6
adding runPipeline tests (#27015) (#33637) 2019-03-21 08:36:39 +01:00
Spencer a053a55013
Refactor ES-related environment variables (#33036) (#33169)
* [ci/es] base default es version on pkg.branch value

* [ci/env] initialize $TEST_ES_FROM in checkout_sibling_es.sh

* [UA] remove TEST_ES_SNAPSHOT_VERSION override

* [ci/es] call checkout_sibling_es.sh from one location

* [ci] remove unused `--from` param

* [ci/env] always default to snapshots, switch to source when necessary

* [kbn/test] default esFrom to $TEST_ES_FROM

* [ci/setup] fix define order

* [ci/grunt] don't pass --esFrom let env pass through

* [ci/env] use branch, not version

* [ci] use same indent style as following lines

* [kbn/test] apply default values when processing args

* [kbn/test] simplify defaults, read default on each process
2019-03-13 13:18:51 -07:00
spalger 75dae0aab2 [x-pack/jest/integration] Jest runs setup hook when tests are skipped...
(cherry picked from commit 33dc8e6cfd)
2019-03-11 22:05:43 -07:00
nicknak 059d4b14f7
Testing/Removal of throw on console error (#29983) (#32692)
* Use hosts instead of url for elasticsearch.

* Adds jest integration tests to run in xpack intake.

* Reverting the exclusion of throwing errors in tests.

* Strange test that seems to fail without console error exception being thrown.

* Fix issues with wrong props for EuiInMemoryTable.

* Removes the masking of console errors in tests.
2019-03-08 08:46:27 -05:00
Matt Apperson 09a3728bc2
fix xpack integration tests, add to CI (#30883) (#31151)
* fix xpack integration tests, add to CI

* faster tests, intigration runs in paralel

* fix intigration test

* revert hard-coding test env to node
2019-02-14 15:08:33 -05:00
Tyler Smalley ef1e5b4288 [ci] Use trap to generate report for non-PR build (#26829)
Since this is no longer part of a reporting task in Jenkins, we no
longer need to re-run kbn bootstrap when generating a report.

We use the PR_SOURCE_BRANCH environment variable to prevent genererating
Github issues when we are on a PR.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-01-08 17:13:12 -06:00
nicknak ac75236b78
Reporting phantom and chromium tests should run in parallel. (#26566)
* Reporting phantom and chromium tests should run in parallel.

* Chromium tests should be done in group 9.

* Attempting to use group 2 in ci for chromium tests.

* X-pack CI jobs should have 7 groups.

* Phantom tests should be in group 7.
2018-12-06 13:45:40 -05:00
spalger 9e94fef2ee [ci] every script needs to have set -e 2018-11-29 03:08:10 -08:00
Spencer 555036447d
[ci] simplify ci_setup scripts (#26215)
Cleanup some of the legacy bits from our ci_setup, simplify the setup necessary in child CI scripts, and unify the more generic bits of the scripts.
2018-11-28 15:37:36 -08:00
Spencer fad8d0cc3a
[ci][ftr][kbn/test] split up CI jobs (#25838)
* [ci][ftr][kbn/test] split up CI jobs

* [ci] run --assert-none-excluded in ci groups, before builds

* [ftr] improve error message when excluded tests found

* [ci] document other places the ciGroups live
2018-11-20 14:02:06 -08:00
Tiago Costa a6818b392d
Run jenkins:unit task with dev flag in order to run license check (#19832)
* chore(19674): added dev flag when calling jenkins:unit grunt task so we can check dev licenses on ours ci jobs.

* chore(NA): update yarn lock files with integrity info.
2018-11-12 19:02:48 +00:00
Spencer 223e3dc6ee
[ui] default to k7Design in releases (#25487)
* [ui] default to k7Design in releases

* [ci] don't build in release mode for testing

* [ci] run SNAPSHOT build
2018-11-09 18:01:48 -08:00
liza-mae 7748fe633f
Fix the jenkins job for cloud to export headless browser variable (#25242) 2018-11-06 12:48:48 -07:00
liza-mae fabbfdcd12
Replace xvfb with headless browser (#24904)
* Replace xvfb with headless browser

* Update karma to run in headless chrome

Update Karma tests for an option to run chrome in headless.

* Fix lint issues

* Fix spaces
2018-11-05 10:40:42 -07:00
Spencer 84e72d3ef6
[ftr] allow filtering suites by tag (#25021)
Closes #22840

In the functional tests we want a better way to include/exclude certain tests, especially as we move forward with #22359. This PR allows us to decorate suite objects with "tags", which won't clutter up the test names and can be used to filter out specific tests within a single test config. The functional test runner supports defining `--include-tag` and `--exclude-tag` CLI arguments, and multiple can be defined.

The method of filtering out tests for running against cloud has been updated to use this approach and I plan to do the same to #22359 once this is merged.
2018-11-02 13:06:25 -07:00
liza-mae 78e212e32d
Add argument passing to jenkins cloud job (#23538) 2018-09-26 14:35:16 -06:00
Josh Dover 3c806b86b4
Setup yarn in current shell for jenkins test report script (#23531)
* Setup yarn in current shell [skip ci]

* Use setup.sh
2018-09-26 10:12:24 -05:00
Josh Dover eb1cfaf0f8
Add jenkins:report task for test failures (#22682)
* Add jenkins:report task

* PR comments
2018-09-21 09:31:51 -05:00
Jonathan Budzenski 03553dedbc [ci] Run ES snapshot when possible (#22663)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.
2018-09-06 16:31:47 -07:00
Stacey Gammon 3aa2f6c1f1
Turn reporting snapshot tests back on with new baselines (#21441)
* Turn reporting snapshot tests back on with new baselines

* Use snapshots generated from chromium.  Bump the threshold so phantom comparisons pass

* Increase timeouts because of chromium functional tests.

* remove accidentally checked in session snapshots

* add a better vis baseline, run once through at 0 to check expected threshold

* turn on verbose logs

* Use threshold, turn debug mode on in jenkins

* Wrap both convert pages in the retry

* Update baselines

Preserve layout one got messed up - it was actually a print layout.

* bump threshold even more
2018-08-06 12:29:16 -04:00
liza-mae 94ac3c5c2a
Shell script to run kibana tests on cloud via Jenkins (#21107)
* Shell script to run kibana tests on cloud via Jenkins

* Add comment explaining cloud setup
2018-07-23 17:54:45 -06:00
archana b03243f5d8
[Functional Tests] Use @kbn/test on Kibana CI (#18967)
* Replace test:api with @kbn/test runTests

* Improve CLI help menu 🆘

* Use --es-from

* Replace jenkins:selenium with kbn-test

* Validate cli args, fixing test in the process

* Clean up some stuff

* Code review fixes

* Explanation for collectCliArgs

* Remove exit codes, they're useless anyway.

* Make markdown vis test pass with dev_mode setting

* Tests

* Remove unneeded export

* Code review: move console logging up to cli.js

* Code review: refactor startServers and runTests to take single options collection

* Code review: Remove all things I am sure we do not use

* Improve tests

* Code review fixes

* Pass created log to runFtr, runElasticsearch, runKibanaServer

* Update --es-from option to --esFrom
2018-06-26 18:08:40 -05:00
Spencer f24a725144
[mocha] remove grunt-simple-mocha (#19079)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 10:43:55 -07:00
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Spencer b78714e8d8
[server/config/deprecationWarnings] fix deprecation logging warnings (#17439)
* [server/config/deprecationWarnings] fix deprecation logging warnings

* typos

* explain kbn_server_worker a bit with better naming and comment

* Address review feedback
2018-03-30 09:35:26 -07:00
Kim Joar Bekkelund e5d33e992a
Move running projects tests into Grunt task (#16946) 2018-03-09 14:28:47 +01:00
CJ Cenizal eb49a8c449
Add test-subj-selector module to packages dir. (#16623)
* Add test-subj-selector module to packages dir.
* Rename to @kbn/test-subj-selector.
* Simplify rejectRejFiles Grunt task and ignore nested node_modules.
* Update jenkins_unit script to use yarn kbn CLI.
2018-02-13 10:34:47 -08:00