mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
autofix all violations
This commit is contained in:
parent
a3553c924d
commit
8e9a8a84dc
4245 changed files with 87774 additions and 82935 deletions
|
@ -21,40 +21,33 @@ import del from 'del';
|
|||
import { join } from 'path';
|
||||
import { execFileSync as exec } from 'child_process';
|
||||
|
||||
export default function (grunt) {
|
||||
grunt.registerTask('docker:docs', 'Build docs from docker', function () {
|
||||
export default function(grunt) {
|
||||
grunt.registerTask('docker:docs', 'Build docs from docker', function() {
|
||||
const rootPath = grunt.config.get('root');
|
||||
const composePath = join(rootPath, 'tasks/docker_docs/docker-compose.yml');
|
||||
const htmlDocsDir = join(rootPath, 'html_docs');
|
||||
|
||||
const env = Object.assign(process.env, {
|
||||
KIBANA_DOCS_CONTAINER_NAME: 'kibana_docs',
|
||||
KIBANA_DOCS_CONTEXT: rootPath
|
||||
KIBANA_DOCS_CONTEXT: rootPath,
|
||||
});
|
||||
const stdio = [0, 1, 2];
|
||||
const execOptions = { env, stdio };
|
||||
|
||||
exec('docker-compose', [
|
||||
'-f', composePath,
|
||||
'up'
|
||||
], execOptions);
|
||||
exec('docker-compose', ['-f', composePath, 'up'], execOptions);
|
||||
|
||||
const containerId = String(exec('docker-compose', [
|
||||
'-f', composePath,
|
||||
'ps',
|
||||
'-q', env.KIBANA_DOCS_CONTAINER_NAME
|
||||
], { env })).trim();
|
||||
const containerId = String(
|
||||
exec('docker-compose', ['-f', composePath, 'ps', '-q', env.KIBANA_DOCS_CONTAINER_NAME], {
|
||||
env,
|
||||
})
|
||||
).trim();
|
||||
|
||||
grunt.log.write('Clearing old docs ... ');
|
||||
del.sync(htmlDocsDir);
|
||||
grunt.log.writeln('done');
|
||||
|
||||
grunt.log.write('Copying new docs ... ');
|
||||
exec('docker', [
|
||||
'cp',
|
||||
`${containerId}:/home/kibana/html_docs`,
|
||||
htmlDocsDir
|
||||
]);
|
||||
exec('docker', ['cp', `${containerId}:/home/kibana/html_docs`, htmlDocsDir]);
|
||||
grunt.log.writeln('done');
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue