Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
451 commits
Select commit Hold shift + click to select a range
78b2778
Fixup timestamp.
wayneseymour Feb 14, 2020
3870be4
Merge branch 'ingest-code-coverage' of github.com:elastic/kibana into…
wayneseymour Feb 14, 2020
81ae5ea
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour Feb 14, 2020
8652b33
Merge branch 'master' into ingest-code-coverage
wayneseymour Feb 28, 2020
8b5b226
Bring in the code from the other branch.
wayneseymour Feb 28, 2020
77998fe
Drop old fn
wayneseymour Feb 28, 2020
3c00200
Fixup static site url, again.
wayneseymour Feb 28, 2020
b7b07fa
Process real data now.
wayneseymour Feb 28, 2020
0f973e7
TRE' SKIPPING SOMEONE ELSE'S TESTS
wayneseymour Feb 28, 2020
f55afb6
Fixup job name
wayneseymour Mar 2, 2020
2c75016
Fixup homepage
wayneseymour Mar 2, 2020
7f3b02b
Print the contents of the outfile, bootstrapped.dat
wayneseymour Mar 2, 2020
de92e2d
Fix the url, again? sheesh
wayneseymour Mar 2, 2020
26b80b0
Use "fold" instead of map
wayneseymour Mar 2, 2020
54197ce
Handle no data.
wayneseymour Mar 2, 2020
e306557
Once again, fixing this darn url. Argh!
wayneseymour Mar 2, 2020
4b0947e
Once again, fixing this darn url. Argh!
wayneseymour Mar 2, 2020
7004a54
FINALLY FIXED! Hip hip, HOORAY!!
wayneseymour Mar 2, 2020
c1d3268
Add the first part of the integration test.
wayneseymour Mar 3, 2020
c09f855
Add the assertions.
wayneseymour Mar 3, 2020
854d22b
A bit of cleanup in the integration test.
wayneseymour Mar 3, 2020
ba5e684
Merge remote-tracking branch 'upstream/master' into ingest-code-coverage
brianseeders Mar 3, 2020
2fddb10
Fix Jenkinsfile post-merge
brianseeders Mar 3, 2020
fff8b10
Fix typo
brianseeders Mar 3, 2020
2601b0d
Fixup url.
wayneseymour Mar 3, 2020
2222f3a
Merge branch 'ingest-code-coverage' of github.com:elastic/kibana into…
wayneseymour Mar 3, 2020
379fd3f
Fix missed reference to oss process
brianseeders Mar 3, 2020
2bd8e7e
Fixup styles.
wayneseymour Mar 3, 2020
80cc028
Zero out the data file.
wayneseymour Mar 3, 2020
e9987aa
Merge branch 'ingest-code-coverage' of github.com:elastic/kibana into…
wayneseymour Mar 3, 2020
56f159b
Prepare to use vault for the es host url, user, and pass.
wayneseymour Mar 4, 2020
110a0b4
Lil cleanup
wayneseymour Mar 4, 2020
3654a24
More tests
wayneseymour Mar 5, 2020
e9b68dc
Actually add the assertions lol
wayneseymour Mar 5, 2020
7aa1139
Change the distro data point to 'combined', per Lee.
wayneseymour Mar 5, 2020
0ca30b7
Finish distro test.
wayneseymour Mar 5, 2020
c28b4c4
Start working towards adding a static site url,
wayneseymour Mar 5, 2020
3606645
Drop un-needed.
wayneseymour Mar 6, 2020
1f13e88
Why not? :)
wayneseymour Mar 6, 2020
7b61bd5
Refactor to test for the totals index.
wayneseymour Mar 6, 2020
218642a
Refactor to test for the totals index, again :(
wayneseymour Mar 6, 2020
6c60481
Add static site url to totals index.
wayneseymour Mar 6, 2020
5c1bb80
Finally done? :)
wayneseymour Mar 6, 2020
773074f
More debug info, for the index.
wayneseymour Mar 9, 2020
a6ddf2c
Working on the tests.
wayneseymour Mar 9, 2020
4584887
Working on the tests, still one fail.
wayneseymour Mar 9, 2020
f094fff
Fix all tests.
wayneseymour Mar 9, 2020
4e31bed
Maybe it's all working bro!!!
wayneseymour Mar 9, 2020
682b5a5
Less code is the best code?
wayneseymour Mar 9, 2020
1e712b1
Less code is the best code, again? lol
wayneseymour Mar 9, 2020
7528bcd
Distill the app's deployment.
wayneseymour Mar 9, 2020
0b99143
Make it executable
wayneseymour Mar 10, 2020
db7efb2
Turn on more tests within
wayneseymour Mar 10, 2020
a2d3042
TRE' SKIPPING SOMEONE ELSE'S TESTS
wayneseymour Mar 10, 2020
e0215eb
TRE' SKIPPING SOMEONE ELSE'S TESTS
wayneseymour Mar 10, 2020
9559893
Go back to running some of the tests,
wayneseymour Mar 10, 2020
9ac93f3
Drop most mentions of the cc app (react app).
wayneseymour Mar 10, 2020
db96d5d
Try to upload with the structure Lee desires.
wayneseymour Mar 10, 2020
835d5a1
Naive url fixups.
wayneseymour Mar 10, 2020
5714195
Lil cleanup
wayneseymour Mar 10, 2020
d510d01
Url fixup
wayneseymour Mar 10, 2020
6cd6da4
Url fixup, cleanup, blah blah blah.
wayneseymour Mar 10, 2020
f851f16
Cleanup after refactor.
wayneseymour Mar 10, 2020
989f9bf
Drop distro per Lee.
wayneseymour Mar 11, 2020
1f07592
Drop distro per Lee, and fixups.
wayneseymour Mar 11, 2020
87bd043
Fix url, again.
wayneseymour Mar 11, 2020
1305f99
Cleanup
wayneseymour Mar 11, 2020
a4050a3
src and test fixups.
wayneseymour Mar 11, 2020
94470c9
Done?
wayneseymour Mar 11, 2020
57aef87
Auto-fix lint.
wayneseymour Mar 12, 2020
b6b5b45
Lint + refactor a tiny bit.
wayneseymour Mar 12, 2020
d1a8af4
Add the secrets path that Josh Mock and I just discussed.
wayneseymour Mar 12, 2020
e800438
Use vault for ES HOST info
wayneseymour Mar 12, 2020
5d69a42
Turn on all the tests (but not the explicit skips)
wayneseymour Mar 12, 2020
aa211f6
Export vault addr env var.
wayneseymour Mar 13, 2020
79c25c2
Export vault token per Josh Mock :)
wayneseymour Mar 13, 2020
8219916
Fix type check errs.
wayneseymour Mar 13, 2020
8d08d50
Drop distro test
wayneseymour Mar 13, 2020
9836a58
Ignore the mocks dir.
wayneseymour Mar 13, 2020
44ea5f2
Drop as many tests as I can discern,
wayneseymour Mar 16, 2020
8c931c6
Ok, same idea as last commit,
wayneseymour Mar 16, 2020
b82f0ea
Dry up the jenkinsfile more,
wayneseymour Mar 16, 2020
58eb7e5
Triple nest the vault calls,
wayneseymour Mar 16, 2020
209d362
Reorg for groovy syntax failure in ci.
wayneseymour Mar 16, 2020
3ce180d
Dont pull from vault in the shell script.
wayneseymour Mar 16, 2020
4543880
Brian S gave Josh and I an example, use it. :)
wayneseymour Mar 16, 2020
01ec75c
Attempt to debug the vault stuff.
wayneseymour Mar 17, 2020
2143de1
Revert the code.
wayneseymour Mar 17, 2020
b106602
Fixup up format and DO NOT print anything vault related.
wayneseymour Mar 17, 2020
b1a3e3b
Dont use vault for the ES_HOST this time.
wayneseymour Mar 17, 2020
f245da0
Bring the code back into the env block to have access
wayneseymour Mar 17, 2020
e0b3644
Try the new user / pass Lee created and Josh
wayneseymour Mar 17, 2020
79743c1
Try the "old" way,
wayneseymour Mar 17, 2020
13051f1
Still hardcoded, but the tests are fully on.
wayneseymour Mar 17, 2020
0669dba
Still hardcoded, but the tests are PARTIALLY on.
wayneseymour Mar 17, 2020
2a76484
All tests back on.
wayneseymour Mar 17, 2020
4eb235b
Run 2 of each distro
wayneseymour Mar 18, 2020
282328d
Attempt to run all tests, faking the timestamp to 2 days back.
wayneseymour Mar 18, 2020
ad6649f
Fake the timestamp to 2 days back,
wayneseymour Mar 18, 2020
742b3b1
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Mar 18, 2020
3d11f02
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour Mar 18, 2020
0088a5b
TRE' SKIPPING SOMEONE ELSE'S TESTS, yet again
wayneseymour Mar 18, 2020
8b4de43
d
wayneseymour Mar 18, 2020
00e7c8d
TRE' SKIPPING SOMEONE ELSE'S TESTS, yet again
wayneseymour Mar 18, 2020
eac5b5d
We cant get past all the test fails, so
wayneseymour Mar 19, 2020
94e2017
Run more groups and add some debugging
wayneseymour Mar 19, 2020
aba53f2
Run oss only
wayneseymour Mar 19, 2020
521633e
Run xpack only.
wayneseymour Mar 19, 2020
0755b8e
Try again
wayneseymour Mar 20, 2020
053a93d
Try again, again :)
wayneseymour Mar 20, 2020
5389b4a
Just oss intake
wayneseymour Mar 20, 2020
d0cb160
Run all
wayneseymour Mar 20, 2020
26bd2c7
Fail fast
wayneseymour Mar 20, 2020
5d2609c
Maybe fail fast
wayneseymour Mar 20, 2020
b72c74d
Fail fast parallel
wayneseymour Mar 21, 2020
8ff2c55
Had some lint in my pocket
wayneseymour Mar 21, 2020
fd8d993
Again
wayneseymour Mar 21, 2020
218aaca
Drop that too
wayneseymour Mar 21, 2020
6fc88da
One mo' :)
wayneseymour Mar 21, 2020
04a0246
One mo', 'gin :) :)
wayneseymour Mar 21, 2020
c6e620d
Ok, so that worked; Now just fail
wayneseymour Mar 21, 2020
a86e75f
Ok, move the fail fast "up"
wayneseymour Mar 21, 2020
288aac3
Run some from both distros
wayneseymour Mar 21, 2020
ec9d544
Run one from both distros,
wayneseymour Mar 21, 2020
58fe8ea
Getting a lil wild with it.
wayneseymour Mar 21, 2020
774d050
Prolly wont work, but it's late, lets see
wayneseymour Mar 21, 2020
d792610
try again
wayneseymour Mar 21, 2020
3123b1d
try again
wayneseymour Mar 21, 2020
05cceb0
Turn most things back on
wayneseymour Mar 21, 2020
5d293e1
whoops
wayneseymour Mar 21, 2020
e2a7573
Difficult syntax to dry up.
wayneseymour Mar 21, 2020
b86069f
Whoops, add the static site data push back into the code.
wayneseymour Mar 21, 2020
a54b970
Run all groups
wayneseymour Mar 21, 2020
740a992
Drop debug
wayneseymour Mar 21, 2020
db2276c
Run just a few groups.
wayneseymour Mar 22, 2020
b27331d
All of oss, one xpack
wayneseymour Mar 23, 2020
5924322
Run the 1st 5 groups in xpack too
wayneseymour Mar 23, 2020
61b9c04
All tests on (except individually skipped)
wayneseymour Mar 23, 2020
781dcff
Skip xpack, group 9
wayneseymour Mar 24, 2020
4015b4d
Merge branch 'ingest-code-coverage' into ingest-code-coverage-WITH-MA…
wayneseymour Mar 24, 2020
fa80c51
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour Mar 24, 2020
8f596af
With ci group 9, to demonstrate.
wayneseymour Mar 24, 2020
bb7325b
Merge branch 'ingest-code-coverage' into ingest-code-coverage-WITH-MA…
wayneseymour Mar 27, 2020
96ccec5
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour Mar 27, 2020
4af8c31
Add these back
wayneseymour Mar 28, 2020
6d71a14
Add this back
wayneseymour Mar 28, 2020
69f0da2
Add this back too
wayneseymour Mar 28, 2020
67648d4
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour Mar 28, 2020
e83c266
Right before merging the other branch into this one.
wayneseymour Mar 30, 2020
5bf5ae0
Drop hardcoded es host url && drop unneeded code
wayneseymour Mar 31, 2020
46b717b
Pare down the mocks dir per cr.
wayneseymour Mar 31, 2020
d7dc231
Merge branch 'master' into ingest-code-coverage
wayneseymour Mar 31, 2020
563c925
Attempt a bash loop, in groovy, while "protecting" the shell
wayneseymour Mar 31, 2020
8d6c306
Fixup bash syntax
wayneseymour Mar 31, 2020
f1a7750
Fixup bash syntax, again.
wayneseymour Mar 31, 2020
6a267f7
Ask for more data from the env.
wayneseymour Mar 31, 2020
d9d1d86
Cleanup list syntax
wayneseymour Mar 31, 2020
0a86b11
I could have sworn I'd added these back previously. :(
wayneseymour Mar 31, 2020
fce6b29
Try w/o branch name
wayneseymour Mar 31, 2020
4fbf7b6
Try w/o git commit and lil more debugging
wayneseymour Mar 31, 2020
27b62a3
More debug
wayneseymour Mar 31, 2020
86016e3
Try w/o these
wayneseymour Mar 31, 2020
4f3c84e
Try git directly.
wayneseymour Mar 31, 2020
b2633c5
Try git directly, in the list
wayneseymour Mar 31, 2020
434557e
Fixup typo
wayneseymour Mar 31, 2020
1bb7250
Try a different way
wayneseymour Mar 31, 2020
f9e61a4
Whoops
wayneseymour Mar 31, 2020
cc36098
Mostly formatting
wayneseymour Mar 31, 2020
5c1ced6
Ok, grab the vcs info I need and print
wayneseymour Mar 31, 2020
bea55da
One mo'.
wayneseymour Mar 31, 2020
f0ec92a
Drop dup
wayneseymour Mar 31, 2020
b790543
Lets see if I can interpolate like this.
wayneseymour Mar 31, 2020
ac20051
I hope this works.
wayneseymour Mar 31, 2020
c4d83e5
Maybe quoting differently helps
wayneseymour Mar 31, 2020
acfe1f0
Lets try it like this
wayneseymour Apr 1, 2020
247d8e4
Different quotes
wayneseymour Apr 1, 2020
72c4dcf
Different approach
wayneseymour Apr 1, 2020
e52a6e9
COME ON!
wayneseymour Apr 1, 2020
0a98ea0
Ok, collect in one spot...use it later
wayneseymour Apr 1, 2020
87dfc1d
Test what happens if the vcs info file is not found
wayneseymour Apr 1, 2020
d0b1d87
Test what happens if the vcs info file is found
wayneseymour Apr 1, 2020
f07b34f
Test what happens if the vcs info file is found, without the andand.
wayneseymour Apr 1, 2020
f229c24
Add the vcs info
wayneseymour Apr 1, 2020
873cf4d
Merge branch 'ingest-code-coverage' into ingest-code-coverage-WITH-MA…
wayneseymour Apr 1, 2020
44ac0d1
Shorten
wayneseymour Apr 1, 2020
73c6468
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Apr 1, 2020
98225aa
Drop this to index some data, will fixup later.
wayneseymour Apr 1, 2020
e8fc596
Cleanup.
wayneseymour Apr 2, 2020
b2d369f
Merge branch 'ingest-code-coverage' into ingest-code-coverage-WITH-MA…
wayneseymour Apr 2, 2020
407d0de
Fixup integration test.
wayneseymour Apr 2, 2020
90a3888
One more test.
wayneseymour Apr 2, 2020
9819477
Drop some data per cr.
wayneseymour Apr 2, 2020
e72b59d
Drop even more mock data.
wayneseymour Apr 2, 2020
4f3181a
Unskip tests per cr, and drop duplicate upload.
wayneseymour Apr 3, 2020
3e85686
Drop un-needed code.
wayneseymour Apr 3, 2020
0bcbf75
Drop more un-needed code.
wayneseymour Apr 3, 2020
64a694c
Re-enable coverage per Dima.
wayneseymour Apr 3, 2020
afd335f
Add url to vcs block and more tests.
wayneseymour Apr 3, 2020
81a1843
Whoops, prolly need this.
wayneseymour Apr 3, 2020
1447719
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine Apr 3, 2020
5c41f25
Use the constants as defaults for consistency, per cr.
wayneseymour Apr 4, 2020
29c91d2
Merge branch 'ingest-code-coverage-WITH-MASTER' of github.com:elastic…
wayneseymour Apr 4, 2020
e012720
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Apr 13, 2020
1f028c2
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine Apr 16, 2020
565815d
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Apr 17, 2020
e51050b
Update docs
wayneseymour Apr 17, 2020
5838efb
Bump timeout to 4 hours
wayneseymour Apr 17, 2020
53cc9f4
Update scripted field, per Lee.
wayneseymour Apr 17, 2020
afacbc4
Update index mapping, per Lee.
wayneseymour Apr 17, 2020
7970a3f
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine Apr 20, 2020
ddbd3bc
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Apr 21, 2020
2d40b48
Add new test skeleton, to address cr:
wayneseymour Apr 21, 2020
27431e6
Merge branch 'ingest-code-coverage-WITH-MASTER' of github.com:elastic…
wayneseymour Apr 21, 2020
f63f75f
Fix logic for 'coveredFilePath' and 'staticSiteUrl',
wayneseymour Apr 21, 2020
672f2e7
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine Apr 22, 2020
49f9c65
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour Apr 22, 2020
f8299dc
Fix tests.
wayneseymour Apr 22, 2020
9bc3509
Merge branch 'master' into ingest-code-coverage-WITH-MASTER-fixed
wayneseymour May 2, 2020
a81f834
Refactor prep
wayneseymour May 3, 2020
4c5f655
Add vault path
wayneseymour May 3, 2020
9ac9ba0
This belongs elsewhere.
wayneseymour May 3, 2020
7306c97
Collect vcs info
wayneseymour May 3, 2020
6ae6c62
Drop duplicate
wayneseymour May 3, 2020
8883fcb
Add the timestamp back, fixup names
wayneseymour May 4, 2020
1116d4e
Cleanup
wayneseymour May 4, 2020
1e61814
Cleanup
wayneseymour May 4, 2020
0df811a
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine May 4, 2020
2fae19b
Fixup index per Lee.
wayneseymour May 4, 2020
e635be1
Prok links and collect vcs info and
wayneseymour May 4, 2020
f44b088
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
wayneseymour May 5, 2020
187ab5e
Drop flaky tests
wayneseymour May 5, 2020
6b20ad4
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine May 6, 2020
e679a3a
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine May 7, 2020
e3a2f37
Refactor per JBudz
wayneseymour May 7, 2020
74c225c
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine May 8, 2020
59b8cc1
Merge branch 'master' into ingest-code-coverage-WITH-MASTER
elasticmachine May 11, 2020
7da7ae8
Drop unused, per cr.
wayneseymour May 11, 2020
e0bb7eb
Change var name per cr.
wayneseymour May 11, 2020
93ca72f
Merge branch 'ingest-code-coverage-WITH-MASTER' of github.com:elastic…
wayneseymour May 11, 2020
0167f7c
Fixup fn per cr.
wayneseymour May 12, 2020
29ebefa
Refactor per cr.
wayneseymour May 12, 2020
0ecf880
Refactor per cr.
wayneseymour May 12, 2020
e8d18ce
Doc fixup
wayneseymour May 12, 2020
08787cf
Use "it" instead.
wayneseymour May 12, 2020
7b440dd
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour May 12, 2020
bc487af
Cr fixups.
wayneseymour May 12, 2020
50fb22e
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour May 13, 2020
fbc8ea4
Fixup owners
wayneseymour May 13, 2020
3dc8c31
Add test
wayneseymour May 13, 2020
bc123d7
Merge branch 'master' of github.com:elastic/kibana into ingest-code-c…
wayneseymour May 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 16 additions & 79 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -5,89 +5,26 @@ kibanaLibrary.load() // load from the Jenkins instance

kibanaPipeline(timeoutMinutes: 240) {
catchErrors {
def timestamp = new Date(currentBuild.startTimeInMillis).format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
withEnv([
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
"TIME_STAMP=${timestamp}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it two words?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two words? Perhaps you mean the groovy to bash interpolation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable you're setting is TIME_STAMP, when TIMESTAMP seems more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make this change chief

'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
'x-pack-intake-agent': {
withEnv([
'NODE_ENV=test' // Needed for jest tests only
]) {
workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh')()
}
},
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
]),
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
]),
])
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaPipeline.bash(
'''
# bootstrap from x-pack folder
source src/dev/ci_setup/setup_env.sh
cd x-pack
yarn kbn bootstrap --prefer-offline
cd ..
# extract archives
mkdir -p /tmp/extracted_coverage
echo extracting intakes
tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
echo extracting kibana-oss-tests
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
echo extracting kibana-xpack-tests
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
# replace path in json files to have valid html report
pwd=$(pwd)
du -sh /tmp/extracted_coverage/target/kibana-coverage/
echo replacing path in json files
for i in {1..9}; do
sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
done
wait
# merge oss & x-pack reports
echo merging coverage reports
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
echo copy mocha reports
mkdir -p target/kibana-coverage/mocha-combined
cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
''',
"run `yarn kbn bootstrap && merge coverage`"
)
sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
}
}
kibanaPipeline.sendMail()
}
kibanaPipeline.sendMail()
}

def handleIngestion(timestamp) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaCoverage.prokLinks("### Process HTML Links")
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}


3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
/src/legacy/server/utils/ @elastic/kibana-operations
/src/legacy/server/warnings/ @elastic/kibana-operations

# Quality Assurance
/src/dev/code_coverage @elastic/kibana-qa

# Platform
/src/core/ @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ npm-debug.log*
.tern-project
x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
/x-pack/legacy/plugins/apm/e2e/snapshots.js
/x-pack/plugins/apm/e2e/snapshots.js
.nyc_output
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"spec_to_console": "node scripts/spec_to_console",
"backport-skip-ci": "backport --prDescription \"[skip-ci]\"",
"storybook": "node scripts/storybook",
"cover:report": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report --reporter=lcov && open ./target/coverage/report/lcov-report/index.html"
"cover:report": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report --reporter=lcov && open ./target/coverage/report/lcov-report/index.html",
"cover:functional:merge": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report/functional --reporter=json-summary"
},
"repository": {
"type": "git",
Expand Down
21 changes: 21 additions & 0 deletions scripts/ingest_coverage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

require('../src/setup_node_env');
require('../src/dev/code_coverage/ingest_coverage').runCoverageIngestionCli();
34 changes: 34 additions & 0 deletions src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import expect from '@kbn/expect';
import { ciRunUrl } from '../transforms';

describe(`Transform fn`, () => {
describe(`ciRunUrl`, () => {
it(`should add the url when present in the environment`, () => {
process.env.CI_RUN_URL = 'blah';
expect(ciRunUrl()).to.have.property('ciRunUrl', 'blah');
});
it(`should not include the url if not present in the environment`, () => {
process.env.CI_RUN_URL = void 0;
expect(ciRunUrl({ a: 'a' })).not.to.have.property('ciRunUrl');
});
});
});
22 changes: 22 additions & 0 deletions src/dev/code_coverage/ingest_coverage/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export const STATIC_SITE_URL_PROP_NAME = 'staticSiteUrl';
export const COVERAGE_INDEX = process.env.COVERAGE_INDEX || 'kibana_code_coverage';
export const TOTALS_INDEX = process.env.TOTALS_INDEX || `kibana_total_code_coverage`;
62 changes: 62 additions & 0 deletions src/dev/code_coverage/ingest_coverage/either.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/* eslint new-cap: 0 */
/* eslint no-unused-vars: 0 */

export const Right = x => ({
chain: f => f(x),
map: f => Right(f(x)),
fold: (f, g) => g(x),
inspect: () => `Right(${x})`,
});

Right.of = function of(x) {
return Right(x);
};

export function right(x) {
return Right.of(x);
}

export const Left = x => ({
chain: f => Left(x),
map: f => Left(x),
fold: (f, g) => f(x),
inspect: () => `Left(${x})`,
});

Left.of = function of(x) {
return Left(x);
};

export function left(x) {
return Left.of(x);
}

export const fromNullable = x =>
x !== null && x !== undefined && x !== false && x !== 'undefined' ? Right(x) : Left(null);

export const tryCatch = f => {
try {
return Right(f());
} catch (e) {
return Left(e);
}
};
61 changes: 61 additions & 0 deletions src/dev/code_coverage/ingest_coverage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { resolve } from 'path';
import { prok } from './process';
import { run, createFlagError } from '@kbn/dev-utils';

const ROOT = resolve(__dirname, '../../../..');
const flags = {
string: ['path', 'verbose', 'vcsInfoPath'],
help: `
--path Required, path to the file to extract coverage data
--vcsInfoPath Required, path to the git info file (branch, sha, author, & commit msg)
`,
};

export function runCoverageIngestionCli() {
run(
({ flags, log }) => {
if (flags.path === '') throw createFlagError('please provide a single --path flag');
if (flags.vcsInfoPath === '')
throw createFlagError('please provide a single --vcsInfoPath flag');
if (flags.verbose) log.verbose(`Verbose logging enabled`);

const resolveRoot = resolve.bind(null, ROOT);
const jsonSummaryPath = resolveRoot(flags.path);
const vcsInfoFilePath = resolveRoot(flags.vcsInfoPath);
prok({ jsonSummaryPath, vcsInfoFilePath }, log);
},
{
description: `

Post code coverage in json-summary format to an ES index.
Note: You probably should create the index first.
Two indexes are needed, see README.md.

Examples:

See 'ingest_code_coverage_readme.md'

`,
flags,
}
);
}
Loading