This repository has been archived on 2020-08-13. You can view files and clone it, but cannot push or open issues or pull requests.
requestor/jenkins.js

23 lines
480 B
JavaScript
Raw Normal View History

2020-01-30 10:51:05 +01:00
'use strict';
2020-05-15 13:16:26 +02:00
const https = require ('https');
2020-01-03 19:13:21 +01:00
const fs = require ('fs');
2020-05-15 13:16:26 +02:00
const { execSync: exec_sync } = require ('child_process');
2020-02-06 12:05:38 +01:00
2020-05-15 13:16:26 +02:00
const run_file = fs.createWriteStream ('.jenkins.run.js');
2020-02-06 12:05:38 +01:00
2020-05-15 13:16:26 +02:00
const [
,, ...args
] = process.argv;
2020-05-13 16:07:31 +02:00
2020-05-15 13:16:26 +02:00
run_file.on ('close', () => {
exec_sync (`node .jenkins.run.js ${args.join (' ')}`, { stdio: 'inherit' });
});
2020-05-05 19:50:12 +02:00
2020-05-15 13:16:26 +02:00
https.get (
'https://git.scode.ovh/Timo/standard/raw/branch/master/jenkins.run.js',
(msg) => {
msg.pipe (run_file);
2020-05-13 16:07:31 +02:00
}
2020-05-15 13:16:26 +02:00
);