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

[Resolver] generator uses setup_node_env #76422

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"cypress:open": "cypress open --config-file ./cypress/cypress.json",
"cypress:run": "cypress run --browser chrome --headless --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-security-solution/cypress/results > ../../../target/kibana-security-solution/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../target/kibana-security-solution/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/ && exit $status;",
"cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/security_solution_cypress/config.ts",
"test:generate": "ts-node --project scripts/endpoint/cli_tsconfig.json scripts/endpoint/resolver_generator.ts"
"test:generate": "node scripts/endpoint/resolver_generator"
},
"devDependencies": {
"@types/md5": "^2.2.0",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/security_solution/scripts/endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ The default behavior is to create 1 endpoint with 1 alert and a moderate number
A seed value can be provided as a string for the random number generator for repeatable behavior, useful for demos etc.
Use the `-d` option if you want to delete and remake the indices, otherwise it will add documents to existing indices.

The sample data generator script depends on ts-node, install with npm:

`npm install -g ts-node`

Example command sequence to get ES and kibana running with sample data after installing ts-node:

`yarn es snapshot` -> starts ES
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

require('../../../../../src/setup_node_env');
Copy link
Contributor

Choose a reason for hiding this comment

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

@oatkiller I'm a bit late - sorry 😄
I was going to suggest that you also set permissions on this script to 755 and add the following shebang line to the top of file, so that we can just invoke it as a shell script:

#!/usr/bin/env node

I think you know this, but we (Endpoint Management) also use this script to load Endpoints 😬

(FYI: https://github.com/paul-tavares/kibana/blob/9873df8ee0ee88584db70debc3316126ba3205af/x-pack/plugins/security_solution/scripts/endpoint/load_trusted_apps.js#L1 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah I didn't know that. I copied the pattern from somewhere else in Kibana.

require('./resolver_generator_script');