Skip to content

Commit

Permalink
Server list script
Browse files Browse the repository at this point in the history
  • Loading branch information
andrwils committed Oct 12, 2023
1 parent dc3efef commit dcb8a72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
13 changes: 0 additions & 13 deletions scripts/server-list-jenkinsfile-parameters.js

This file was deleted.

7 changes: 5 additions & 2 deletions scripts/server-list.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Prints a list of fluent bit servers, formatted for Jenkins fluent bit job parameters
const fs = require('fs');

const testFolder = __dirname + '/../config/server/';

fs.readdir(testFolder, (err, files) => {
let servers = '';
files
.filter(file => file !== 'localhost.json')
.filter(file => file.endsWith('.json'))
.map(file => file.slice(0, -5))
.forEach(file => {
console.log(file);
});
servers += `'${file}', `;
});
console.log(servers.slice(0, -2));
});

0 comments on commit dcb8a72

Please sign in to comment.