mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[FTR][CI] Use default distribution for all tests (#94968)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
e3f0afa4e0
commit
537be25754
32 changed files with 2806 additions and 636 deletions
|
@ -73,11 +73,7 @@ def agentProcess(Map params = [:]) {
|
|||
]) {
|
||||
task {
|
||||
if (config.needBuild) {
|
||||
if (!config.isXpack) {
|
||||
kibanaPipeline.buildOss()
|
||||
} else {
|
||||
kibanaPipeline.buildXpack()
|
||||
}
|
||||
kibanaPipeline.buildKibana()
|
||||
}
|
||||
|
||||
for(def i = 0; i < config.agentExecutions; i++) {
|
||||
|
|
|
@ -16,7 +16,7 @@ kibanaPipeline(timeoutMinutes: 180) {
|
|||
def job = 'xpack-securityCypress'
|
||||
|
||||
workers.ci(name: job, size: 'l', ramDisk: true) {
|
||||
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
|
||||
kibanaPipeline.bash('test/scripts/jenkins_build_kibana.sh', 'Build Distributable')
|
||||
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')()
|
||||
// Temporarily disabled to figure out test flake
|
||||
// kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')()
|
||||
|
|
|
@ -37,12 +37,8 @@ kibanaPipeline(timeoutMinutes: 210) {
|
|||
])
|
||||
|
||||
task {
|
||||
kibanaPipeline.buildOss(6)
|
||||
kibanaPipeline.buildKibana(16)
|
||||
tasks.ossCiGroups()
|
||||
}
|
||||
|
||||
task {
|
||||
kibanaPipeline.buildXpack(10, true)
|
||||
tasks.xpackCiGroups()
|
||||
tasks.xpackCiGroupDocker()
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ export async function createDefaultSpace({
|
|||
{
|
||||
index,
|
||||
id: 'space:default',
|
||||
refresh: 'wait_for',
|
||||
body: {
|
||||
type: 'space',
|
||||
updated_at: new Date().toISOString(),
|
||||
|
|
|
@ -63,6 +63,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('dashboard panel full screen', async () => {
|
||||
const header = await dashboardPanelActions.getPanelHeading('[Flights] Airline Carrier');
|
||||
await dashboardPanelActions.toggleContextMenu(header);
|
||||
await dashboardPanelActions.clickContextMenuMoreItem();
|
||||
|
||||
await testSubjects.click('embeddablePanelAction-togglePanel');
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
|
|
|
@ -43,7 +43,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.body).to.eql({
|
||||
elasticsearchIndicesCreated: { kibana_sample_data_flights: 13059 },
|
||||
kibanaSavedObjectsLoaded: 20,
|
||||
kibanaSavedObjectsLoaded: 23,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -99,26 +99,6 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
expect(resp.body.message).to.contain('banana not found');
|
||||
});
|
||||
|
||||
it('should return 400 when index type is provided in OSS', async () => {
|
||||
const resp = await supertest
|
||||
.post(`/internal/search/es`)
|
||||
.send({
|
||||
indexType: 'baad',
|
||||
params: {
|
||||
body: {
|
||||
query: {
|
||||
match_all: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
.expect(400);
|
||||
|
||||
verifyErrorResponse(resp.body, 400);
|
||||
|
||||
expect(resp.body.message).to.contain('Unsupported index pattern');
|
||||
});
|
||||
|
||||
it('should return 400 with illegal ES argument', async () => {
|
||||
const resp = await supertest
|
||||
.post(`/internal/search/es`)
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
export default function ({ loadTestFile }) {
|
||||
describe('Telemetry', () => {
|
||||
loadTestFile(require.resolve('./telemetry_local'));
|
||||
loadTestFile(require.resolve('./opt_in'));
|
||||
loadTestFile(require.resolve('./telemetry_optin_notice_seen'));
|
||||
});
|
||||
|
|
|
@ -1,331 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import supertestAsPromised from 'supertest-as-promised';
|
||||
import { omit } from 'lodash';
|
||||
import { basicUiCounters } from './__fixtures__/ui_counters';
|
||||
import { basicUsageCounters } from './__fixtures__/usage_counters';
|
||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import type { SavedObject } from '../../../../src/core/server';
|
||||
import ossRootTelemetrySchema from '../../../../src/plugins/telemetry/schema/oss_root.json';
|
||||
import ossPluginsTelemetrySchema from '../../../../src/plugins/telemetry/schema/oss_plugins.json';
|
||||
import { assertTelemetryPayload, flatKeys } from './utils';
|
||||
|
||||
async function retrieveTelemetry(
|
||||
supertest: supertestAsPromised.SuperTest<supertestAsPromised.Test>
|
||||
) {
|
||||
const { body } = await supertest
|
||||
.post('/api/telemetry/v2/clusters/_stats')
|
||||
.set('kbn-xsrf', 'xxx')
|
||||
.send({ unencrypted: true })
|
||||
.expect(200);
|
||||
|
||||
expect(body.length).to.be(1);
|
||||
return body[0];
|
||||
}
|
||||
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const supertest = getService('supertest');
|
||||
const es = getService('es');
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
||||
describe('/api/telemetry/v2/clusters/_stats', () => {
|
||||
before('make sure there are some saved objects', () => esArchiver.load('saved_objects/basic'));
|
||||
after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/basic'));
|
||||
|
||||
before('create some telemetry-data tracked indices', async () => {
|
||||
await es.indices.create({ index: 'filebeat-telemetry_tests_logs' });
|
||||
});
|
||||
|
||||
after('cleanup telemetry-data tracked indices', async () => {
|
||||
await es.indices.delete({ index: 'filebeat-telemetry_tests_logs' });
|
||||
});
|
||||
|
||||
describe('validate data types', () => {
|
||||
let stats: Record<string, any>;
|
||||
|
||||
before('pull local stats', async () => {
|
||||
stats = await retrieveTelemetry(supertest);
|
||||
});
|
||||
|
||||
it('should pass the schema validation', () => {
|
||||
try {
|
||||
assertTelemetryPayload(
|
||||
{ root: ossRootTelemetrySchema, plugins: ossPluginsTelemetrySchema },
|
||||
stats
|
||||
);
|
||||
} catch (err) {
|
||||
err.message = `The telemetry schemas in 'src/plugins/telemetry/schema/' are out-of-date, please update it as required: ${err.message}`;
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
|
||||
it('should pass ad-hoc enforced validations', () => {
|
||||
expect(stats.collection).to.be('local');
|
||||
expect(stats.collectionSource).to.be('local');
|
||||
expect(stats.license).to.be(undefined); // OSS cannot get the license
|
||||
expect(stats.stack_stats.kibana.count).to.be.a('number');
|
||||
expect(stats.stack_stats.kibana.indices).to.be.a('number');
|
||||
expect(stats.stack_stats.kibana.os.platforms[0].platform).to.be.a('string');
|
||||
expect(stats.stack_stats.kibana.os.platforms[0].count).to.be(1);
|
||||
expect(stats.stack_stats.kibana.os.platformReleases[0].platformRelease).to.be.a('string');
|
||||
expect(stats.stack_stats.kibana.os.platformReleases[0].count).to.be(1);
|
||||
expect(stats.stack_stats.kibana.plugins.telemetry.opt_in_status).to.be(false);
|
||||
expect(stats.stack_stats.kibana.plugins.telemetry.usage_fetcher).to.be.a('string');
|
||||
expect(stats.stack_stats.kibana.plugins.stack_management).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.ui_metric).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.ui_counters).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.application_usage).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.kql.defaultQueryLanguage).to.be.a('string');
|
||||
expect(stats.stack_stats.kibana.plugins.localization).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.csp.strict).to.be(true);
|
||||
expect(stats.stack_stats.kibana.plugins.csp.warnLegacyBrowsers).to.be(true);
|
||||
expect(stats.stack_stats.kibana.plugins.csp.rulesChangedFromDefault).to.be(false);
|
||||
expect(stats.stack_stats.kibana.plugins.kibana_config_usage).to.be.an('object');
|
||||
// non-default kibana configs. Configs set at 'test/api_integration/config.js'.
|
||||
expect(omit(stats.stack_stats.kibana.plugins.kibana_config_usage, 'server.port')).to.eql({
|
||||
'elasticsearch.username': '[redacted]',
|
||||
'elasticsearch.password': '[redacted]',
|
||||
'elasticsearch.hosts': '[redacted]',
|
||||
'elasticsearch.healthCheck.delay': 3600000,
|
||||
'plugins.paths': '[redacted]',
|
||||
'logging.json': false,
|
||||
'server.xsrf.disableProtection': true,
|
||||
'server.compression.referrerWhitelist': '[redacted]',
|
||||
'server.maxPayload': 1679958,
|
||||
'status.allowAnonymous': true,
|
||||
'home.disableWelcomeScreen': true,
|
||||
'data.search.aggs.shardDelay.enabled': true,
|
||||
'security.showInsecureClusterWarning': false,
|
||||
'telemetry.banner': false,
|
||||
'telemetry.url': '[redacted]',
|
||||
'telemetry.optInStatusUrl': '[redacted]',
|
||||
'telemetry.optIn': false,
|
||||
'newsfeed.service.urlRoot': '[redacted]',
|
||||
'newsfeed.service.pathTemplate': '[redacted]',
|
||||
'savedObjects.maxImportPayloadBytes': 10485760,
|
||||
'savedObjects.maxImportExportSize': 10001,
|
||||
'usageCollection.usageCounters.bufferDuration': 0,
|
||||
});
|
||||
expect(stats.stack_stats.kibana.plugins.kibana_config_usage['server.port']).to.be.a(
|
||||
'number'
|
||||
);
|
||||
|
||||
// Testing stack_stats.data
|
||||
expect(stats.stack_stats.data).to.be.an('object');
|
||||
expect(stats.stack_stats.data).to.be.an('array');
|
||||
expect(stats.stack_stats.data[0]).to.be.an('object');
|
||||
expect(stats.stack_stats.data[0].pattern_name).to.be('filebeat');
|
||||
expect(stats.stack_stats.data[0].shipper).to.be('filebeat');
|
||||
expect(stats.stack_stats.data[0].index_count).to.be(1);
|
||||
expect(stats.stack_stats.data[0].doc_count).to.be(0);
|
||||
expect(stats.stack_stats.data[0].ecs_index_count).to.be(0);
|
||||
expect(stats.stack_stats.data[0].size_in_bytes).to.be.a('number');
|
||||
|
||||
expect(stats.stack_stats.kibana.plugins.saved_objects_counts).to.be.an('object');
|
||||
expect(stats.stack_stats.kibana.plugins.saved_objects_counts.by_type).to.be.an('array');
|
||||
expect(stats.stack_stats.kibana.plugins.saved_objects_counts.by_type).to.eql([
|
||||
{ type: 'config', count: 2 },
|
||||
{ type: 'dashboard', count: 2 },
|
||||
{ type: 'index-pattern', count: 2 },
|
||||
{ type: 'visualization', count: 2 },
|
||||
]);
|
||||
});
|
||||
|
||||
it('should validate mandatory fields exist', () => {
|
||||
const actual = flatKeys(stats);
|
||||
expect(actual).to.be.an('array');
|
||||
const expected = [
|
||||
'cluster_name',
|
||||
'cluster_stats.cluster_uuid',
|
||||
'cluster_stats.indices.analysis',
|
||||
'cluster_stats.indices.completion',
|
||||
'cluster_stats.indices.count',
|
||||
'cluster_stats.indices.docs',
|
||||
'cluster_stats.indices.fielddata',
|
||||
'cluster_stats.indices.mappings',
|
||||
'cluster_stats.indices.query_cache',
|
||||
'cluster_stats.indices.segments',
|
||||
'cluster_stats.indices.shards',
|
||||
'cluster_stats.indices.store',
|
||||
'cluster_stats.nodes.count',
|
||||
'cluster_stats.nodes.discovery_types',
|
||||
'cluster_stats.nodes.fs',
|
||||
'cluster_stats.nodes.ingest',
|
||||
'cluster_stats.nodes.jvm',
|
||||
'cluster_stats.nodes.network_types',
|
||||
'cluster_stats.nodes.os',
|
||||
'cluster_stats.nodes.packaging_types',
|
||||
'cluster_stats.nodes.plugins',
|
||||
'cluster_stats.nodes.process',
|
||||
'cluster_stats.nodes.versions',
|
||||
'cluster_stats.nodes.usage',
|
||||
'cluster_stats.status',
|
||||
'cluster_stats.timestamp',
|
||||
'cluster_uuid',
|
||||
'collection',
|
||||
'collectionSource',
|
||||
'stack_stats.kibana.count',
|
||||
'stack_stats.kibana.indices',
|
||||
'stack_stats.kibana.os',
|
||||
'stack_stats.kibana.plugins',
|
||||
'stack_stats.kibana.versions',
|
||||
'timestamp',
|
||||
'version',
|
||||
];
|
||||
|
||||
expect(expected.every((m) => actual.includes(m))).to.be.ok();
|
||||
});
|
||||
});
|
||||
|
||||
describe('UI Counters telemetry', () => {
|
||||
before('Add UI Counters saved objects', () => esArchiver.load('saved_objects/ui_counters'));
|
||||
after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/ui_counters'));
|
||||
it('returns ui counters aggregated by day', async () => {
|
||||
const stats = await retrieveTelemetry(supertest);
|
||||
expect(stats.stack_stats.kibana.plugins.ui_counters).to.eql(basicUiCounters);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Usage Counters telemetry', () => {
|
||||
before('Add UI Counters saved objects', () =>
|
||||
esArchiver.load('saved_objects/usage_counters')
|
||||
);
|
||||
after('cleanup saved objects changes', () =>
|
||||
esArchiver.unload('saved_objects/usage_counters')
|
||||
);
|
||||
|
||||
it('returns usage counters aggregated by day', async () => {
|
||||
const stats = await retrieveTelemetry(supertest);
|
||||
expect(stats.stack_stats.kibana.plugins.usage_counters).to.eql(basicUsageCounters);
|
||||
});
|
||||
});
|
||||
|
||||
describe('application usage limits', () => {
|
||||
function createSavedObject(viewId?: string) {
|
||||
return supertest
|
||||
.post('/api/saved_objects/application_usage_daily')
|
||||
.send({
|
||||
attributes: {
|
||||
appId: 'test-app',
|
||||
viewId,
|
||||
minutesOnScreen: 10.33,
|
||||
numberOfClicks: 10,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
})
|
||||
.expect(200)
|
||||
.then((resp) => resp.body.id);
|
||||
}
|
||||
|
||||
describe('basic behaviour', () => {
|
||||
let savedObjectIds: string[] = [];
|
||||
before('create application usage entries', async () => {
|
||||
await esArchiver.emptyKibanaIndex();
|
||||
savedObjectIds = await Promise.all([
|
||||
createSavedObject(),
|
||||
createSavedObject('appView1'),
|
||||
createSavedObject(),
|
||||
]);
|
||||
});
|
||||
after('cleanup', async () => {
|
||||
await Promise.all(
|
||||
savedObjectIds.map((savedObjectId) => {
|
||||
return supertest
|
||||
.delete(`/api/saved_objects/application_usage_daily/${savedObjectId}`)
|
||||
.expect(200);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it('should return application_usage data', async () => {
|
||||
const stats = await retrieveTelemetry(supertest);
|
||||
expect(stats.stack_stats.kibana.plugins.application_usage).to.eql({
|
||||
'test-app': {
|
||||
appId: 'test-app',
|
||||
viewId: 'main',
|
||||
clicks_total: 20,
|
||||
clicks_7_days: 20,
|
||||
clicks_30_days: 20,
|
||||
clicks_90_days: 20,
|
||||
minutes_on_screen_total: 20.66,
|
||||
minutes_on_screen_7_days: 20.66,
|
||||
minutes_on_screen_30_days: 20.66,
|
||||
minutes_on_screen_90_days: 20.66,
|
||||
views: [
|
||||
{
|
||||
appId: 'test-app',
|
||||
viewId: 'appView1',
|
||||
clicks_total: 10,
|
||||
clicks_7_days: 10,
|
||||
clicks_30_days: 10,
|
||||
clicks_90_days: 10,
|
||||
minutes_on_screen_total: 10.33,
|
||||
minutes_on_screen_7_days: 10.33,
|
||||
minutes_on_screen_30_days: 10.33,
|
||||
minutes_on_screen_90_days: 10.33,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('10k + 1', () => {
|
||||
const savedObjectIds = [];
|
||||
before('create 10k + 1 entries for application usage', async () => {
|
||||
await supertest
|
||||
.post('/api/saved_objects/_bulk_create')
|
||||
.send(
|
||||
new Array(10001).fill(0).map(() => ({
|
||||
type: 'application_usage_daily',
|
||||
attributes: {
|
||||
appId: 'test-app',
|
||||
minutesOnScreen: 1,
|
||||
numberOfClicks: 1,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
}))
|
||||
)
|
||||
.expect(200)
|
||||
.then((resp) =>
|
||||
resp.body.saved_objects.forEach(({ id }: SavedObject) => savedObjectIds.push(id))
|
||||
);
|
||||
});
|
||||
after('clean them all', async () => {
|
||||
// The SavedObjects API does not allow bulk deleting, and deleting one by one takes ages and the tests timeout
|
||||
await es.deleteByQuery({
|
||||
index: '.kibana',
|
||||
body: { query: { term: { type: 'application_usage_daily' } } },
|
||||
conflicts: 'proceed',
|
||||
});
|
||||
});
|
||||
|
||||
it("should only use the first 10k docs for the application_usage data (they'll be rolled up in a later process)", async () => {
|
||||
const stats = await retrieveTelemetry(supertest);
|
||||
expect(stats.stack_stats.kibana.plugins.application_usage).to.eql({
|
||||
'test-app': {
|
||||
appId: 'test-app',
|
||||
viewId: 'main',
|
||||
clicks_total: 10000,
|
||||
clicks_7_days: 10000,
|
||||
clicks_30_days: 10000,
|
||||
clicks_90_days: 10000,
|
||||
minutes_on_screen_total: 10000,
|
||||
minutes_on_screen_7_days: 10000,
|
||||
minutes_on_screen_30_days: 10000,
|
||||
minutes_on_screen_90_days: 10000,
|
||||
views: [],
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -30,14 +30,6 @@ export function DeploymentProvider({ getService }: FtrProviderContext) {
|
|||
return getUrl.baseUrl(config.get('servers.elasticsearch'));
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper to detect an OSS licensed Kibana
|
||||
* Useful for functional testing in cloud environment
|
||||
*/
|
||||
async isOss() {
|
||||
return config.get('kbnTestServer.serverArgs').indexOf('--oss') > -1;
|
||||
},
|
||||
|
||||
async isCloud(): Promise<boolean> {
|
||||
const baseUrl = this.getHostPort();
|
||||
const username = config.get('servers.kibana.username');
|
||||
|
|
|
@ -22,7 +22,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
await retry.try(async () => {
|
||||
const text = await testSubjects.getVisibleText('expressionResult');
|
||||
expect(text).to.be(
|
||||
'{\n "type": "error",\n "error": {\n "message": "Function markdown could not be found.",\n "name": "fn not found"\n }\n}'
|
||||
'{\n "type": "render",\n "as": "markdown",\n "value": {\n "content": "## expressions explorer",\n "font": {\n "type": "style",\n "spec": {\n "fontFamily": "\'Open Sans\', Helvetica, Arial, sans-serif",\n "fontWeight": "normal",\n "fontStyle": "normal",\n "textDecoration": "none",\n "textAlign": "left",\n "fontSize": "14px",\n "lineHeight": "1"\n },\n "css": "font-family:\'Open Sans\', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:left;font-size:14px;line-height:1"\n },\n "openLinksInNewTab": false\n }\n}'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -30,7 +30,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
it('renders expression', async () => {
|
||||
await retry.try(async () => {
|
||||
const text = await testSubjects.getVisibleText('expressionRender');
|
||||
expect(text).to.be('Function markdown could not be found.');
|
||||
expect(text).to.be('expressions explorer rendering');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import expect from '@kbn/expect';
|
|||
export default function ({ getService, getPageObjects }) {
|
||||
const browser = getService('browser');
|
||||
const globalNav = getService('globalNav');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const PageObjects = getPageObjects(['common', 'header', 'home']);
|
||||
|
||||
describe('Kibana takes you home', function describeIndexTests() {
|
||||
|
@ -25,7 +26,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('clicking on console on homepage should take you to console app', async () => {
|
||||
await PageObjects.home.clickSynopsis('console');
|
||||
await PageObjects.common.navigateToUrl('home');
|
||||
await testSubjects.click('homeDevTools');
|
||||
const url = await browser.getCurrentUrl();
|
||||
expect(url.includes('/app/dev_tools#/console')).to.be(true);
|
||||
});
|
||||
|
|
|
@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../ftr_provider_context';
|
|||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const globalNav = getService('globalNav');
|
||||
const deployment = getService('deployment');
|
||||
const PageObjects = getPageObjects(['newsfeed']);
|
||||
|
||||
describe('Newsfeed', () => {
|
||||
|
@ -38,16 +37,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('shows all news from newsfeed', async () => {
|
||||
const objects = await PageObjects.newsfeed.getNewsfeedList();
|
||||
|
||||
if (await deployment.isOss()) {
|
||||
expect(objects).to.eql([
|
||||
'21 June 2019\nYou are functionally testing the newsfeed widget with fixtures!\nSee test/common/fixtures/plugins/newsfeed/newsfeed_simulation\nGeneric feed-viewer could go here',
|
||||
'21 June 2019\nStaging too!\nHello world\nGeneric feed-viewer could go here',
|
||||
]);
|
||||
} else {
|
||||
// can't shim the API in cloud so going to check that at least something is rendered
|
||||
// to test that the API was called and returned something that could be rendered
|
||||
expect(objects.length).to.be.above(0);
|
||||
}
|
||||
// can't shim the API in cloud so going to check that at least something is rendered
|
||||
// to test that the API was called and returned something that could be rendered
|
||||
expect(objects.length).to.be.above(0);
|
||||
});
|
||||
|
||||
it('clicking on newsfeed icon should close opened newsfeed', async () => {
|
||||
|
|
|
@ -27,7 +27,6 @@ import expect from '@kbn/expect';
|
|||
export default function ({ getService, getPageObjects }) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const deployment = getService('deployment');
|
||||
const log = getService('log');
|
||||
const browser = getService('browser');
|
||||
const retry = getService('retry');
|
||||
|
@ -187,16 +186,14 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should visualize scripted field in vertical bar chart', async function () {
|
||||
const isOss = await deployment.isOss();
|
||||
if (!isOss) {
|
||||
await filterBar.removeAllFilters();
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'Average of ram_Pain1'
|
||||
);
|
||||
}
|
||||
await filterBar.removeAllFilters();
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'@timestamp',
|
||||
'Median of ram_Pain1'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -277,15 +274,12 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should visualize scripted field in vertical bar chart', async function () {
|
||||
const isOss = await deployment.isOss();
|
||||
if (!isOss) {
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'Top values of painString'
|
||||
);
|
||||
}
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'Top values of painString'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -367,15 +361,12 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should visualize scripted field in vertical bar chart', async function () {
|
||||
const isOss = await deployment.isOss();
|
||||
if (!isOss) {
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'Top values of painBool'
|
||||
);
|
||||
}
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'Top values of painBool'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -460,15 +451,10 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should visualize scripted field in vertical bar chart', async function () {
|
||||
const isOss = await deployment.isOss();
|
||||
if (!isOss) {
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain(
|
||||
'painDate'
|
||||
);
|
||||
}
|
||||
await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
// verify Lens opens a visualization
|
||||
expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain('painDate');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -35,6 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.visualize.clickAggBasedVisualizations();
|
||||
const expectedChartTypes = [
|
||||
'Area',
|
||||
'Coordinate Map',
|
||||
'Data table',
|
||||
'Gauge',
|
||||
'Goal',
|
||||
|
@ -43,6 +44,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
'Line',
|
||||
'Metric',
|
||||
'Pie',
|
||||
'Region Map',
|
||||
'Tag cloud',
|
||||
'Timelion',
|
||||
'Vertical bar',
|
||||
|
|
|
@ -125,26 +125,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
it('Fit data bounds should zoom to level 3', async function () {
|
||||
const expectedPrecision2DataTable = [
|
||||
['-', 'dr4', '127', { lat: 40, lon: -76 }],
|
||||
['-', 'dr7', '92', { lat: 41, lon: -74 }],
|
||||
['-', '9q5', '91', { lat: 34, lon: -119 }],
|
||||
['-', '9qc', '89', { lat: 38, lon: -122 }],
|
||||
['-', 'drk', '87', { lat: 41, lon: -73 }],
|
||||
['-', 'dps', '82', { lat: 42, lon: -84 }],
|
||||
['-', 'dph', '82', { lat: 40, lon: -84 }],
|
||||
['-', 'dp3', '79', { lat: 41, lon: -88 }],
|
||||
['-', 'dpe', '78', { lat: 42, lon: -86 }],
|
||||
['-', 'dp8', '77', { lat: 43, lon: -90 }],
|
||||
['-', 'dp6', '74', { lat: 41, lon: -87 }],
|
||||
['-', 'djv', '74', { lat: 33, lon: -83 }],
|
||||
['-', '9qh', '74', { lat: 34, lon: -118 }],
|
||||
['-', 'dpq', '73', { lat: 41, lon: -81 }],
|
||||
['-', 'dpp', '73', { lat: 40, lon: -80 }],
|
||||
['-', '9y7', '73', { lat: 35, lon: -97 }],
|
||||
['-', '9vg', '73', { lat: 32, lon: -97 }],
|
||||
['-', 'drs', '71', { lat: 42, lon: -73 }],
|
||||
['-', '9ys', '71', { lat: 37, lon: -95 }],
|
||||
['-', '9yn', '71', { lat: 34, lon: -93 }],
|
||||
['-', 'dn', '1,429', { lat: 36, lon: -85 }],
|
||||
['-', 'dp', '1,418', { lat: 41, lon: -85 }],
|
||||
['-', '9y', '1,215', { lat: 36, lon: -96 }],
|
||||
['-', '9z', '1,099', { lat: 42, lon: -96 }],
|
||||
['-', 'dr', '1,076', { lat: 42, lon: -74 }],
|
||||
['-', 'dj', '982', { lat: 31, lon: -85 }],
|
||||
['-', '9v', '938', { lat: 31, lon: -96 }],
|
||||
['-', '9q', '722', { lat: 36, lon: -120 }],
|
||||
['-', '9w', '475', { lat: 36, lon: -107 }],
|
||||
['-', 'cb', '457', { lat: 46, lon: -96 }],
|
||||
['-', 'c2', '453', { lat: 47, lon: -120 }],
|
||||
['-', '9x', '420', { lat: 41, lon: -107 }],
|
||||
['-', 'dq', '399', { lat: 37, lon: -78 }],
|
||||
['-', '9r', '396', { lat: 41, lon: -120 }],
|
||||
['-', '9t', '274', { lat: 32, lon: -107 }],
|
||||
['-', 'c8', '271', { lat: 47, lon: -107 }],
|
||||
['-', 'dh', '214', { lat: 26, lon: -82 }],
|
||||
['-', 'b6', '207', { lat: 60, lon: -162 }],
|
||||
['-', 'bd', '206', { lat: 59, lon: -153 }],
|
||||
['-', 'b7', '167', { lat: 64, lon: -163 }],
|
||||
];
|
||||
|
||||
await PageObjects.tileMap.clickMapFitDataBounds();
|
||||
|
|
|
@ -14,8 +14,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
const log = getService('log');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const deployment = getService('deployment');
|
||||
let isOss = true;
|
||||
|
||||
describe('visualize app', () => {
|
||||
before(async () => {
|
||||
|
@ -28,7 +26,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
defaultIndex: 'logstash-*',
|
||||
[UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b',
|
||||
});
|
||||
isOss = await deployment.isOss();
|
||||
});
|
||||
|
||||
// TODO: Remove when vislib is removed
|
||||
|
@ -66,11 +63,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
loadTestFile(require.resolve('./_data_table'));
|
||||
loadTestFile(require.resolve('./_data_table_nontimeindex'));
|
||||
loadTestFile(require.resolve('./_data_table_notimeindex_filters'));
|
||||
|
||||
// this check is not needed when the CI doesn't run anymore for the OSS
|
||||
if (!isOss) {
|
||||
loadTestFile(require.resolve('./_chart_types'));
|
||||
}
|
||||
loadTestFile(require.resolve('./_chart_types'));
|
||||
});
|
||||
|
||||
describe('', function () {
|
||||
|
@ -98,11 +91,8 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
loadTestFile(require.resolve('./_linked_saved_searches'));
|
||||
loadTestFile(require.resolve('./_visualize_listing'));
|
||||
loadTestFile(require.resolve('./_add_to_dashboard.ts'));
|
||||
|
||||
if (isOss) {
|
||||
loadTestFile(require.resolve('./_tile_map'));
|
||||
loadTestFile(require.resolve('./_region_map'));
|
||||
}
|
||||
loadTestFile(require.resolve('./_tile_map'));
|
||||
loadTestFile(require.resolve('./_region_map'));
|
||||
});
|
||||
|
||||
describe('', function () {
|
||||
|
|
|
@ -14,6 +14,7 @@ export default async function ({ readConfigFile }) {
|
|||
|
||||
return {
|
||||
testFiles: [
|
||||
require.resolve('./apps/status_page'),
|
||||
require.resolve('./apps/bundles'),
|
||||
require.resolve('./apps/console'),
|
||||
require.resolve('./apps/context'),
|
||||
|
@ -23,7 +24,6 @@ export default async function ({ readConfigFile }) {
|
|||
require.resolve('./apps/home'),
|
||||
require.resolve('./apps/management'),
|
||||
require.resolve('./apps/saved_objects_management'),
|
||||
require.resolve('./apps/status_page'),
|
||||
require.resolve('./apps/timelion'),
|
||||
require.resolve('./apps/visualize'),
|
||||
],
|
||||
|
@ -36,13 +36,15 @@ export default async function ({ readConfigFile }) {
|
|||
...commonConfig.get('esTestCluster'),
|
||||
serverArgs: ['xpack.security.enabled=false'],
|
||||
},
|
||||
|
||||
kbnTestServer: {
|
||||
...commonConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...commonConfig.get('kbnTestServer.serverArgs'),
|
||||
'--oss',
|
||||
'--telemetry.optIn=false',
|
||||
'--xpack.security.enabled=false',
|
||||
'--savedObjects.maxImportPayloadBytes=10485760',
|
||||
'--xpack.maps.showMapVisualizationTypes=true',
|
||||
],
|
||||
},
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
const testSubjects = getService('testSubjects');
|
||||
const retry = getService('retry');
|
||||
const find = getService('find');
|
||||
const deployment = getService('deployment');
|
||||
const PageObjects = getPageObjects(['common']);
|
||||
let isOss = true;
|
||||
|
||||
class HomePage {
|
||||
async clickSynopsis(title: string) {
|
||||
|
@ -72,10 +70,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
|
||||
async launchSampleDashboard(id: string) {
|
||||
await this.launchSampleDataSet(id);
|
||||
isOss = await deployment.isOss();
|
||||
if (!isOss) {
|
||||
await find.clickByLinkText('Dashboard');
|
||||
}
|
||||
await find.clickByLinkText('Dashboard');
|
||||
}
|
||||
|
||||
async launchSampleDataSet(id: string) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd "$KIBANA_DIR"
|
||||
source src/dev/ci_setup/setup_env.sh
|
||||
|
||||
if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then
|
||||
|
@ -12,16 +13,50 @@ export KBN_NP_PLUGINS_BUILT=true
|
|||
echo " -> Ensuring all functional tests are in a ciGroup"
|
||||
node scripts/ensure_all_tests_in_ci_group;
|
||||
|
||||
echo " -> Ensuring all x-pack functional tests are in a ciGroup"
|
||||
node x-pack/scripts/functional_tests --assert-none-excluded \
|
||||
--include-tag ciGroup1 \
|
||||
--include-tag ciGroup2 \
|
||||
--include-tag ciGroup3 \
|
||||
--include-tag ciGroup4 \
|
||||
--include-tag ciGroup5 \
|
||||
--include-tag ciGroup6 \
|
||||
--include-tag ciGroup7 \
|
||||
--include-tag ciGroup8 \
|
||||
--include-tag ciGroup9 \
|
||||
--include-tag ciGroup10 \
|
||||
--include-tag ciGroup11 \
|
||||
--include-tag ciGroup12 \
|
||||
--include-tag ciGroup13 \
|
||||
--include-tag ciGroupDocker
|
||||
|
||||
# Do not build kibana for code coverage run
|
||||
if [[ -z "$CODE_COVERAGE" ]] ; then
|
||||
echo " -> building and extracting OSS Kibana distributable for use in functional tests"
|
||||
node scripts/build --debug --oss
|
||||
echo " -> building and extracting default Kibana distributable for use in functional tests"
|
||||
node scripts/build --debug --no-oss
|
||||
|
||||
echo " -> shipping metrics from build to ci-stats"
|
||||
node scripts/ship_ci_stats \
|
||||
--metrics target/optimizer_bundle_metrics.json \
|
||||
--metrics packages/kbn-ui-shared-deps/target/metrics.json
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build-oss"
|
||||
cp -pR build/oss/kibana-*-SNAPSHOT-linux-x86_64/. $WORKSPACE/kibana-build-oss/
|
||||
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
|
||||
installDir="$KIBANA_DIR/install/kibana"
|
||||
mkdir -p "$installDir"
|
||||
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
||||
cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz"
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build/
|
||||
|
||||
echo " -> Archive built plugins"
|
||||
shopt -s globstar
|
||||
tar -zcf \
|
||||
"$WORKSPACE/kibana-default-plugins.tar.gz" \
|
||||
x-pack/plugins/**/target/public \
|
||||
x-pack/test/**/target/public \
|
||||
examples/**/target/public \
|
||||
x-pack/examples/**/target/public \
|
||||
test/**/target/public
|
||||
shopt -u globstar
|
||||
fi
|
||||
|
|
|
@ -64,8 +64,8 @@ installDir="$KIBANA_DIR/install/kibana"
|
|||
mkdir -p "$installDir"
|
||||
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build-xpack"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
|
||||
mkdir -p "$WORKSPACE/kibana-build"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build/
|
||||
|
||||
echo " -> Setup env for tests"
|
||||
source test/scripts/jenkins_test_setup_xpack.sh
|
||||
|
|
|
@ -4,10 +4,19 @@ source src/dev/ci_setup/setup_env.sh
|
|||
|
||||
echo " -> building kibana platform plugins"
|
||||
node scripts/build_kibana_platform_plugins \
|
||||
--oss \
|
||||
--scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \
|
||||
--scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \
|
||||
--scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \
|
||||
--scan-dir "$KIBANA_DIR/examples" \
|
||||
--workers 6 \
|
||||
--verbose
|
||||
--scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \
|
||||
--scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/usage_collection/plugins" \
|
||||
--scan-dir "$XPACK_DIR/test/security_functional/fixtures/common" \
|
||||
--scan-dir "$XPACK_DIR/examples" \
|
||||
--workers 12
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
source test/scripts/jenkins_test_setup.sh
|
||||
|
||||
if [[ -z "$CODE_COVERAGE" ]]; then
|
||||
destDir="$WORKSPACE/kibana-build-oss-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}"
|
||||
destDir="$WORKSPACE/kibana-build-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}"
|
||||
|
||||
if [[ ! -d $destDir ]]; then
|
||||
mkdir -p $destDir
|
||||
cp -pR "$WORKSPACE/kibana-build-oss/." $destDir/
|
||||
cp -pR "$WORKSPACE/kibana-build/." $destDir/
|
||||
fi
|
||||
|
||||
export KIBANA_INSTALL_DIR="$destDir"
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
source test/scripts/jenkins_test_setup.sh
|
||||
|
||||
if [[ -z "$CODE_COVERAGE" ]]; then
|
||||
destDir="$WORKSPACE/kibana-build-xpack-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}"
|
||||
destDir="$WORKSPACE/kibana-build-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}"
|
||||
|
||||
if [[ ! -d $destDir ]]; then
|
||||
mkdir -p $destDir
|
||||
cp -pR "$WORKSPACE/kibana-build-xpack/." $destDir/
|
||||
cp -pR "$WORKSPACE/kibana-build/." $destDir/
|
||||
fi
|
||||
|
||||
export KIBANA_INSTALL_DIR="$(realpath $destDir)"
|
||||
|
|
|
@ -17,8 +17,8 @@ installDir="$KIBANA_DIR/install/kibana"
|
|||
mkdir -p "$installDir"
|
||||
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build-xpack"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
|
||||
mkdir -p "$WORKSPACE/kibana-build"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build/
|
||||
|
||||
cd "$KIBANA_DIR"
|
||||
source "test/scripts/jenkins_xpack_saved_objects_field_metrics.sh"
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd "$KIBANA_DIR"
|
||||
source src/dev/ci_setup/setup_env.sh
|
||||
|
||||
if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then
|
||||
./test/scripts/jenkins_xpack_build_plugins.sh
|
||||
fi
|
||||
|
||||
# doesn't persist, also set in kibanaPipeline.groovy
|
||||
export KBN_NP_PLUGINS_BUILT=true
|
||||
|
||||
echo " -> Ensuring all functional tests are in a ciGroup"
|
||||
cd "$XPACK_DIR"
|
||||
node scripts/functional_tests --assert-none-excluded \
|
||||
--include-tag ciGroup1 \
|
||||
--include-tag ciGroup2 \
|
||||
--include-tag ciGroup3 \
|
||||
--include-tag ciGroup4 \
|
||||
--include-tag ciGroup5 \
|
||||
--include-tag ciGroup6 \
|
||||
--include-tag ciGroup7 \
|
||||
--include-tag ciGroup8 \
|
||||
--include-tag ciGroup9 \
|
||||
--include-tag ciGroup10 \
|
||||
--include-tag ciGroup11 \
|
||||
--include-tag ciGroup12 \
|
||||
--include-tag ciGroup13 \
|
||||
--include-tag ciGroupDocker
|
||||
|
||||
# Do not build kibana for code coverage run
|
||||
if [[ -z "$CODE_COVERAGE" ]] ; then
|
||||
echo " -> building and extracting default Kibana distributable for use in functional tests"
|
||||
cd "$KIBANA_DIR"
|
||||
node scripts/build --debug --no-oss
|
||||
|
||||
echo " -> shipping metrics from build to ci-stats"
|
||||
node scripts/ship_ci_stats \
|
||||
--metrics target/optimizer_bundle_metrics.json \
|
||||
--metrics packages/kbn-ui-shared-deps/target/metrics.json
|
||||
|
||||
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
|
||||
installDir="$KIBANA_DIR/install/kibana"
|
||||
mkdir -p "$installDir"
|
||||
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
|
||||
cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz"
|
||||
|
||||
mkdir -p "$WORKSPACE/kibana-build-xpack"
|
||||
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
|
||||
|
||||
echo " -> Archive built plugins"
|
||||
shopt -s globstar
|
||||
tar -zcf \
|
||||
"$WORKSPACE/kibana-default-plugins.tar.gz" \
|
||||
x-pack/plugins/**/target/public \
|
||||
x-pack/test/**/target/public \
|
||||
examples/**/target/public \
|
||||
x-pack/examples/**/target/public \
|
||||
test/**/target/public
|
||||
shopt -u globstar
|
||||
fi
|
|
@ -17,7 +17,7 @@ export default function ({ getService }) {
|
|||
|
||||
await supertest.get('/').expect('location', url).expect(302);
|
||||
|
||||
await supertest.get('/').redirects(1).expect('location', '/app/home').expect(302);
|
||||
await supertest.get('/').redirects(1).expect('location', '/spaces/enter').expect(302);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -194,12 +194,12 @@ def runTests() {
|
|||
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
|
||||
'kibana-oss-agent' : workers.functional(
|
||||
'kibana-oss-tests',
|
||||
{ kibanaPipeline.buildOss() },
|
||||
{ kibanaPipeline.buildKibana() },
|
||||
ossProks()
|
||||
),
|
||||
'kibana-xpack-agent' : workers.functional(
|
||||
'kibana-xpack-tests',
|
||||
{ kibanaPipeline.buildXpack() },
|
||||
{ kibanaPipeline.buildKibana() },
|
||||
xpackProks()
|
||||
),
|
||||
])
|
||||
|
|
|
@ -303,33 +303,23 @@ def doSetup() {
|
|||
}
|
||||
}
|
||||
|
||||
def buildOss(maxWorkers = '') {
|
||||
notifyOnError {
|
||||
withEnv(["KBN_OPTIMIZER_MAX_WORKERS=${maxWorkers}"]) {
|
||||
runbld("./test/scripts/jenkins_build_kibana.sh", "Build OSS/Default Kibana")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getBuildArtifactBucket() {
|
||||
def dir = env.ghprbPullId ? "pr-${env.ghprbPullId}" : buildState.get('checkoutInfo').branch.replace("/", "__")
|
||||
return "gs://ci-artifacts.kibana.dev/default-build/${dir}/${buildState.get('checkoutInfo').commit}"
|
||||
}
|
||||
|
||||
def buildXpack(maxWorkers = '', uploadArtifacts = false) {
|
||||
def buildKibana(maxWorkers = '') {
|
||||
notifyOnError {
|
||||
withEnv(["KBN_OPTIMIZER_MAX_WORKERS=${maxWorkers}"]) {
|
||||
runbld("./test/scripts/jenkins_xpack_build_kibana.sh", "Build X-Pack Kibana")
|
||||
runbld("./test/scripts/jenkins_build_kibana.sh", "Build Kibana")
|
||||
}
|
||||
|
||||
if (uploadArtifacts) {
|
||||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
|
||||
bash("""
|
||||
cd "${env.WORKSPACE}"
|
||||
gsutil -q -m cp 'kibana-default.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
gsutil -q -m cp 'kibana-default-plugins.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
""", "Upload Default Build artifacts to GCS")
|
||||
}
|
||||
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
|
||||
bash("""
|
||||
cd "${env.WORKSPACE}"
|
||||
gsutil -q -m cp 'kibana-default.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
gsutil -q -m cp 'kibana-default-plugins.tar.gz' '${getBuildArtifactBucket()}/'
|
||||
""", "Upload Default Build artifacts to GCS")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -443,14 +433,10 @@ def withDocker(Closure closure) {
|
|||
)
|
||||
}
|
||||
|
||||
def buildOssPlugins() {
|
||||
def buildPlugins() {
|
||||
runbld('./test/scripts/jenkins_build_plugins.sh', 'Build OSS Plugins')
|
||||
}
|
||||
|
||||
def buildXpackPlugins() {
|
||||
runbld('./test/scripts/jenkins_xpack_build_plugins.sh', 'Build X-Pack Plugins')
|
||||
}
|
||||
|
||||
def withTasks(Map params = [:], Closure closure) {
|
||||
catchErrors {
|
||||
def config = [setupWork: {}, worker: [:], parallel: 24] + params
|
||||
|
@ -466,8 +452,7 @@ def withTasks(Map params = [:], Closure closure) {
|
|||
},
|
||||
|
||||
// There are integration tests etc that require the plugins to be built first, so let's go ahead and build them before set up the parallel workspaces
|
||||
ossPlugins: { buildOssPlugins() },
|
||||
xpackPlugins: { buildXpackPlugins() },
|
||||
plugins: { buildPlugins() },
|
||||
])
|
||||
|
||||
config.setupWork()
|
||||
|
@ -487,8 +472,11 @@ def allCiTasks() {
|
|||
tasks.check()
|
||||
tasks.lint()
|
||||
tasks.test()
|
||||
tasks.functionalOss()
|
||||
tasks.functionalXpack()
|
||||
task {
|
||||
buildKibana(16)
|
||||
tasks.functionalOss()
|
||||
tasks.functionalXpack()
|
||||
}
|
||||
tasks.storybooksCi()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -55,8 +55,8 @@ def xpackCiGroupDocker() {
|
|||
kibanaPipeline.downloadDefaultBuildArtifacts()
|
||||
kibanaPipeline.bash("""
|
||||
cd '${env.WORKSPACE}'
|
||||
mkdir -p kibana-build-xpack
|
||||
tar -xzf kibana-default.tar.gz -C kibana-build-xpack --strip=1
|
||||
mkdir -p kibana-build
|
||||
tar -xzf kibana-default.tar.gz -C kibana-build --strip=1
|
||||
tar -xzf kibana-default-plugins.tar.gz -C kibana
|
||||
""", "Extract Default Build artifacts")
|
||||
kibanaPipeline.xpackCiGroupProcess('Docker', true)()
|
||||
|
@ -75,8 +75,6 @@ def functionalOss(Map params = [:]) {
|
|||
]
|
||||
|
||||
task {
|
||||
kibanaPipeline.buildOss(6)
|
||||
|
||||
if (config.ciGroups) {
|
||||
ossCiGroups()
|
||||
}
|
||||
|
@ -115,8 +113,6 @@ def functionalXpack(Map params = [:]) {
|
|||
]
|
||||
|
||||
task {
|
||||
kibanaPipeline.buildXpack(10, true)
|
||||
|
||||
if (config.ciGroups) {
|
||||
xpackCiGroups()
|
||||
xpackCiGroupDocker()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue