-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathworker.js
More file actions
34 lines (27 loc) · 830 Bytes
/
worker.js
File metadata and controls
34 lines (27 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
const build = require('./lib/build');
// Export.
module.exports = {
// Initialize the plugin for a job
// config: taken from DB config extended by flat file config
// job & repo: see strider-runner-core
// cb(err, initialized plugin)
init: function (configuration, job, context, cb) {
// Get the config (if any.)
var config = configuration || {};
// The options to pass to the callback.
var options = {};
// Add the build instructions here.
options[config.buildPhase] = build(config);
// Register the plugin and it's options.
cb(null, options);
},
// If provided, autodetect is run if the project has *no* plugin
// configuration at all.
autodetect: {
filename: 'Dockerfile',
exists: true,
language: 'docker',
framework: null
}
};