Skip to content

Commit

Permalink
[7.x] Re-split ciGroups after pipeline rollout (elastic#46375) (elast…
Browse files Browse the repository at this point in the history
…ic#46643)

* Re-split ciGroups after pipeline rollout

Revert "Revert "Revert "Revert "Revert "[ci] compress jobs for CI stab… (elastic#45454)"

This reverts commit 9a109f2.

Revert "set IS_PIPELINE_JOB in intake jobs (elastic#45850)"

This reverts commit b1a01ef.

* Split one of the slow test suites up to try to make overall CI faster

* Disable visualRegression groups, they are being handled in other work

* Revert "Split one of the slow test suites up to try to make overall CI faster"

This reverts commit 1213239.

* Move some different xpack ciGroup8 suites around
  • Loading branch information
Spencer authored Sep 26, 2019
1 parent 78c281b commit 2e2e1ea
Showing 36 changed files with 111 additions and 75 deletions.
17 changes: 15 additions & 2 deletions .ci/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
JOB:
- intake
- firefoxSmoke
- kibana-intake
- x-pack-intake
- kibana-firefoxSmoke
- kibana-ciGroup1
- kibana-ciGroup2
- kibana-ciGroup3
- kibana-ciGroup4
- kibana-ciGroup5
- kibana-ciGroup6
- kibana-ciGroup7
- kibana-ciGroup8
- kibana-ciGroup9
- kibana-ciGroup10
- kibana-ciGroup11
- kibana-ciGroup12
# - kibana-visualRegression

# make sure all x-pack-ciGroups are listed in test/scripts/jenkins_xpack_ci_group.sh
- x-pack-firefoxSmoke
- x-pack-ciGroup1
- x-pack-ciGroup2
- x-pack-ciGroup3
- x-pack-ciGroup4
- x-pack-ciGroup5
- x-pack-ciGroup6
- x-pack-ciGroup7
- x-pack-ciGroup8
- x-pack-ciGroup9
- x-pack-ciGroup10
# - x-pack-visualRegression

# `~` is yaml for `null`
10 changes: 8 additions & 2 deletions .ci/run.sh
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ source src/dev/ci_setup/setup.sh
source src/dev/ci_setup/checkout_sibling_es.sh

case "$JOB" in
intake)
kibana-intake)
./test/scripts/jenkins_unit.sh
;;
kibana-ciGroup*)
@@ -21,16 +21,22 @@ kibana-ciGroup*)
kibana-visualRegression*)
./test/scripts/jenkins_visual_regression.sh
;;
firefoxSmoke*)
kibana-firefoxSmoke*)
./test/scripts/jenkins_firefox_smoke.sh
;;
x-pack-intake)
./test/scripts/jenkins_xpack.sh
;;
x-pack-ciGroup*)
export CI_GROUP="${JOB##x-pack-ciGroup}"
./test/scripts/jenkins_xpack_ci_group.sh
;;
x-pack-visualRegression*)
./test/scripts/jenkins_xpack_visual_regression.sh
;;
x-pack-firefoxSmoke*)
./test/scripts/jenkins_xpack_firefox_smoke.sh
;;
*)
echo "JOB '$JOB' is not implemented."
exit 1
32 changes: 16 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -6,36 +6,36 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
ansiColor('xterm') {
catchError {
parallel([
'intake-agent': legacyJobRunner('intake'),
'firefox-smoke-agent': legacyJobRunner('firefoxSmoke'),
'kibana-intake-agent': legacyJobRunner('kibana-intake'),
'x-pack-intake-agent': legacyJobRunner('x-pack-intake'),
'kibana-oss-agent': withWorkers('kibana-oss-tests', { buildOss() }, [
'oss-ciGroup1': getOssCiGroupWorker(1),
'oss-ciGroup2': getOssCiGroupWorker(2),
'oss-ciGroup3': getOssCiGroupWorker(3),
'oss-ciGroup4': getOssCiGroupWorker(4),
'oss-ciGroup5': getOssCiGroupWorker(5),
'oss-ciGroup6': getOssCiGroupWorker(6),
// 'oss-ciGroup7': getOssCiGroupWorker(7),
// 'oss-ciGroup8': getOssCiGroupWorker(8),
// 'oss-ciGroup9': getOssCiGroupWorker(9),
// 'oss-ciGroup10': getOssCiGroupWorker(10),
// 'oss-ciGroup11': getOssCiGroupWorker(11),
// 'oss-ciGroup12': getOssCiGroupWorker(12),
'oss-ciGroup7': getOssCiGroupWorker(7),
'oss-ciGroup8': getOssCiGroupWorker(8),
'oss-ciGroup9': getOssCiGroupWorker(9),
'oss-ciGroup10': getOssCiGroupWorker(10),
'oss-ciGroup11': getOssCiGroupWorker(11),
'oss-ciGroup12': getOssCiGroupWorker(12),
'oss-firefoxSmoke': getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' }),
// 'oss-visualRegression': getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' }),
// 'oss-firefoxSmoke': getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' }),
]),
'kibana-xpack-agent': withWorkers('kibana-xpack-tests', { buildXpack() }, [
'xpack-ciGroup1': getXpackCiGroupWorker(1),
'xpack-ciGroup2': getXpackCiGroupWorker(2),
'xpack-ciGroup3': getXpackCiGroupWorker(3),
'xpack-ciGroup4': getXpackCiGroupWorker(4),
'xpack-ciGroup5': getXpackCiGroupWorker(5),
// 'xpack-ciGroup6': getXpackCiGroupWorker(6),
// 'xpack-ciGroup7': getXpackCiGroupWorker(7),
// 'xpack-ciGroup8': getXpackCiGroupWorker(8),
// 'xpack-ciGroup9': getXpackCiGroupWorker(9),
// 'xpack-ciGroup10': getXpackCiGroupWorker(10),
// 'xpack-firefoxSmoke': getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' }),
'xpack-ciGroup6': getXpackCiGroupWorker(6),
'xpack-ciGroup7': getXpackCiGroupWorker(7),
'xpack-ciGroup8': getXpackCiGroupWorker(8),
'xpack-ciGroup9': getXpackCiGroupWorker(9),
'xpack-ciGroup10': getXpackCiGroupWorker(10),
'xpack-firefoxSmoke': getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' }),
// 'xpack-visualRegression': getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' }),
]),
])
@@ -109,6 +109,7 @@ def getPostBuildWorker(name, closure) {
"TEST_KIBANA_URL=http://elastic:changeme@localhost:${kibanaPort}",
"TEST_ES_URL=http://elastic:changeme@localhost:${esPort}",
"TEST_ES_TRANSPORT_PORT=${esTransportPort}",
"IS_PIPELINE_JOB=1",
]) {
closure()
}
@@ -171,7 +172,6 @@ def jobRunner(label, closure) {

withEnv([
"CI=true",
"IS_PIPELINE_JOB=1",
"HOME=${env.JENKINS_HOME}",
"PR_SOURCE_BRANCH=${env.ghprbSourceBranch}",
"PR_TARGET_BRANCH=${env.ghprbTargetBranch}",
4 changes: 2 additions & 2 deletions test/functional/apps/management/index.js
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ export default function ({ getService, loadTestFile }) {
});

describe('', function () {
this.tags('ciGroup1');
this.tags('ciGroup7');

loadTestFile(require.resolve('./_create_index_pattern_wizard'));
loadTestFile(require.resolve('./_index_pattern_create_delete'));
@@ -45,7 +45,7 @@ export default function ({ getService, loadTestFile }) {
});

describe('', function () {
this.tags('ciGroup2');
this.tags('ciGroup8');

loadTestFile(require.resolve('./_index_pattern_filter'));
loadTestFile(require.resolve('./_scripted_fields_filter'));
8 changes: 4 additions & 4 deletions test/functional/apps/visualize/index.ts
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
});

describe('', function() {
this.tags('ciGroup3');
this.tags('ciGroup9');

loadTestFile(require.resolve('./_embedding_chart'));
loadTestFile(require.resolve('./_chart_types'));
@@ -50,7 +50,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
});

describe('', function() {
this.tags('ciGroup4');
this.tags('ciGroup10');

loadTestFile(require.resolve('./_inspector'));
loadTestFile(require.resolve('./_experimental_vis'));
@@ -62,7 +62,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
});

describe('', function() {
this.tags('ciGroup5');
this.tags('ciGroup11');

loadTestFile(require.resolve('./_line_chart'));
loadTestFile(require.resolve('./_pie_chart'));
@@ -76,7 +76,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
});

describe('', function() {
this.tags('ciGroup6');
this.tags('ciGroup12');

loadTestFile(require.resolve('./_tag_cloud'));
loadTestFile(require.resolve('./_tile_map'));
12 changes: 6 additions & 6 deletions test/mocha_decorations.d.ts
Original file line number Diff line number Diff line change
@@ -26,12 +26,12 @@ type Tags =
| 'ciGroup4'
| 'ciGroup5'
| 'ciGroup6'
| 'ciGroup1'
| 'ciGroup2'
| 'ciGroup3'
| 'ciGroup4'
| 'ciGroup5'
| 'ciGroup6';
| 'ciGroup7'
| 'ciGroup8'
| 'ciGroup9'
| 'ciGroup10'
| 'ciGroup11'
| 'ciGroup12';

// We need to use the namespace here to match the Mocha definition
// eslint-disable-next-line @typescript-eslint/no-namespace
20 changes: 13 additions & 7 deletions test/scripts/jenkins_firefox_smoke.sh
Original file line number Diff line number Diff line change
@@ -8,11 +8,19 @@ else
source src/dev/ci_setup/setup_env.sh
fi

node scripts/build --debug --oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-oss-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
if [[ -z "$IS_PIPELINE_JOB" ]] ; then
node scripts/build --debug --oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-oss-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
else
installDir="$(realpath $PARENT_DIR/kibana/build/oss/kibana-*-SNAPSHOT-linux-x86_64)"
destDir=${installDir}-${CI_WORKER_NUMBER}
cp -R "$installDir" "$destDir"

export KIBANA_INSTALL_DIR="$destDir"
fi

export TEST_BROWSER_HEADLESS=1

@@ -22,5 +30,3 @@ checks-reporter-with-killswitch "Firefox smoke test" \
--kibana-install-dir "$installDir" \
--include-tag "smoke" \
--config test/functional/config.firefox.js;

source "$KIBANA_DIR/test/scripts/jenkins_xpack_firefox_smoke.sh"
2 changes: 0 additions & 2 deletions test/scripts/jenkins_unit.sh
Original file line number Diff line number Diff line change
@@ -9,5 +9,3 @@ fi
export TEST_BROWSER_HEADLESS=1

"$(FORCE_COLOR=0 yarn bin)/grunt" jenkins:unit --dev;

source "$KIBANA_DIR/test/scripts/jenkins_xpack.sh"
7 changes: 6 additions & 1 deletion test/scripts/jenkins_xpack_ci_group.sh
Original file line number Diff line number Diff line change
@@ -18,7 +18,12 @@ if [[ -z "$IS_PIPELINE_JOB" ]] ; then
--include-tag ciGroup2 \
--include-tag ciGroup3 \
--include-tag ciGroup4 \
--include-tag ciGroup5
--include-tag ciGroup5 \
--include-tag ciGroup6 \
--include-tag ciGroup7 \
--include-tag ciGroup8 \
--include-tag ciGroup9 \
--include-tag ciGroup10
fi

cd "$KIBANA_DIR"
20 changes: 14 additions & 6 deletions test/scripts/jenkins_xpack_firefox_smoke.sh
Original file line number Diff line number Diff line change
@@ -8,12 +8,20 @@ else
source src/dev/ci_setup/setup_env.sh
fi

node scripts/build --debug --no-oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
export KIBANA_INSTALL_DIR="$installDir"
if [[ -z "$IS_PIPELINE_JOB" ]] ; then
node scripts/build --debug --no-oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1
export KIBANA_INSTALL_DIR="$installDir"
else
installDir="$PARENT_DIR/install/kibana"
destDir="${installDir}-${CI_WORKER_NUMBER}"
cp -R "$installDir" "$destDir"

export KIBANA_INSTALL_DIR="$destDir"
fi

export TEST_BROWSER_HEADLESS=1

Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export default function alertingApiIntegrationTests({
const esArchiver = getService('esArchiver');

describe('alerting api integration security and spaces enabled', function() {
this.tags('ciGroup3');
this.tags('ciGroup1');

before(async () => {
for (const space of Spaces) {
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export default function alertingApiIntegrationTests({
const esArchiver = getService('esArchiver');

describe('alerting api integration spaces only', function() {
this.tags('ciGroup3');
this.tags('ciGroup1');

before(async () => {
for (const space of Object.values(Spaces)) {
2 changes: 1 addition & 1 deletion x-pack/test/api_integration/apis/index.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

export default function ({ loadTestFile }) {
describe('apis', function () {
this.tags('ciGroup1');
this.tags('ciGroup6');

loadTestFile(require.resolve('./es'));
loadTestFile(require.resolve('./security'));
2 changes: 1 addition & 1 deletion x-pack/test/api_integration/apis/security/index.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

export default function ({ loadTestFile }) {
describe('security', function () {
this.tags('ciGroup1');
this.tags('ciGroup6');

loadTestFile(require.resolve('./basic_login'));
loadTestFile(require.resolve('./builtin_es_privileges'));
2 changes: 1 addition & 1 deletion x-pack/test/api_integration/apis/spaces/index.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default function({ loadTestFile }: FtrProviderContext) {
describe('spaces', function() {
this.tags('ciGroup1');
this.tags('ciGroup6');

loadTestFile(require.resolve('./saved_objects'));
loadTestFile(require.resolve('./space_attributes'));
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/apm/index.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default function({ loadTestFile }: FtrProviderContext) {
describe('APM', function() {
this.tags('ciGroup1');
this.tags('ciGroup6');
loadTestFile(require.resolve('./feature_controls'));
});
}
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/dashboard_mode/index.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

export default function ({ loadTestFile }) {
describe('dashboard mode', function () {
this.tags('ciGroup2');
this.tags('ciGroup7');

loadTestFile(require.resolve('./dashboard_view_mode'));
});
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default ({ loadTestFile }: FtrProviderContext) => {
describe('Index Lifecycle Management app', function() {
this.tags('ciGroup2');
this.tags('ciGroup7');
loadTestFile(require.resolve('./home_page'));
});
};
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/infra/index.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default ({ loadTestFile }: FtrProviderContext) => {
describe('InfraOps app', function() {
this.tags('ciGroup2');
this.tags('ciGroup7');

loadTestFile(require.resolve('./home_page'));
loadTestFile(require.resolve('./feature_controls'));
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/license_management/index.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default ({ loadTestFile }: FtrProviderContext) => {
describe('License app', function() {
this.tags('ciGroup2');
this.tags('ciGroup7');
loadTestFile(require.resolve('./home_page'));
});
};
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/maps/index.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export default function ({ loadTestFile, getService }) {
});

describe('', function () {
this.tags('ciGroup2');
this.tags('ciGroup7');
loadTestFile(require.resolve('./documents_source'));
loadTestFile(require.resolve('./saved_object_management'));
loadTestFile(require.resolve('./sample_data'));
@@ -38,7 +38,7 @@ export default function ({ loadTestFile, getService }) {
});

describe('', function () {
this.tags('ciGroup5');
this.tags('ciGroup10');
loadTestFile(require.resolve('./es_geo_grid_source'));
loadTestFile(require.resolve('./joins'));
loadTestFile(require.resolve('./add_layer_panel'));
Loading

0 comments on commit 2e2e1ea

Please sign in to comment.