Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to run kibana from build for CI #19125

Merged
merged 1 commit into from
May 18, 2018
Merged

Option to run kibana from build for CI #19125

merged 1 commit into from
May 18, 2018

Conversation

rhoboat
Copy link

@rhoboat rhoboat commented May 16, 2018

@spalger pointed out that the code for running kibana from an installation (build) for x-pack tests was bumped out with #18568 merging with opening-xpack.

These files show the flow that we used to run from build:

const runFromSourceArgs = existingInstallDir
? ['--optimize.useBundleCache=true']
: [
KIBANA_SCRIPT_PATH,
'--no-base-path',
`--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`,
];

.option(
'--kibana-install-dir <path>',
'Run Kibana from an existing install directory'
)

echo " -> building and extracting default Kibana distributable for use in functional tests"
cd "$KIBANA_DIR"
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
echo " -> Running api integration tests"
cd "$XPACK_DIR"
node scripts/functional_tests_api --kibana-install-dir "$installDir" --es-from=source
echo ""
echo ""
echo " -> Running functional tests"
cd "$XPACK_DIR"
xvfb-run node scripts/functional_tests --bail --kibana-install-dir "$installDir" --es-from=source

This PR integrates that with the new setup.


Also addresses and fixes #19181, making sure to run node scripts/functional_tests_server with the --dev flag, to watch for code changes and restart Kibana.

@rhoboat rhoboat self-assigned this May 16, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rhoboat
Copy link
Author

rhoboat commented May 16, 2018

Huzzah! Looks like it's working.

`--elasticsearch.username=${servers.elasticsearch.username}`,
`--elasticsearch.password=${servers.elasticsearch.password}`,
],
},
Copy link
Author

Choose a reason for hiding this comment

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

Just had to reogranize what's provided by common config.

return installDir
? [...serverArgs, ...buildArgs]
: [KIBANA_EXEC_PATH, ...serverArgs, ...sourceArgs];
}
Copy link
Author

Choose a reason for hiding this comment

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

Here's where we collect the right CLI args based on whether installDir was passed (based --kibana-install-dir)

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kimjoar kimjoar mentioned this pull request May 17, 2018
13 tasks
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rhoboat
Copy link
Author

rhoboat commented May 17, 2018

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rhoboat
Copy link
Author

rhoboat commented May 18, 2018

Much better!

@rhoboat rhoboat added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc backport pending dev review labels May 18, 2018
@rhoboat rhoboat merged commit 5969860 into elastic:master May 18, 2018
@rhoboat rhoboat deleted the xpack-ci-build-kibana branch May 18, 2018 17:45
rhoboat pushed a commit that referenced this pull request May 18, 2018
rhoboat pushed a commit that referenced this pull request May 18, 2018
rhoboat pushed a commit that referenced this pull request May 18, 2018
rhoboat pushed a commit that referenced this pull request May 18, 2018
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aa.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c611206.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860.
rhoboat pushed a commit that referenced this pull request May 18, 2018
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aa.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c611206.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860.
rhoboat pushed a commit that referenced this pull request May 18, 2018
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aa.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c611206.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860.
@epixa epixa added the reverted label May 18, 2018
rhoboat pushed a commit that referenced this pull request May 21, 2018
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
rhoboat pushed a commit that referenced this pull request May 22, 2018
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
rhoboat pushed a commit that referenced this pull request May 22, 2018
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev reverted review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Functional Test Server] Changes to the x-pack code require restarting the test server
4 participants