add initial compileGroup support
This commit is contained in:
@@ -63,6 +63,17 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.ALLOWED_COMPILE_GROUPS) {
|
||||
try {
|
||||
module.exports.allowedCompileGroups = process.env.ALLOWED_COMPILE_GROUPS.split(
|
||||
' '
|
||||
)
|
||||
} catch (error) {
|
||||
console.error(error, 'could not apply allowed compile group setting')
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.DOCKER_RUNNER) {
|
||||
let seccompProfilePath
|
||||
module.exports.clsi = {
|
||||
@@ -82,6 +93,21 @@ if (process.env.DOCKER_RUNNER) {
|
||||
checkProjectsIntervalMs: 10 * 60 * 1000
|
||||
}
|
||||
|
||||
try {
|
||||
// Override individual docker settings using path-based keys, e.g.:
|
||||
// compileGroupDockerConfigs = {
|
||||
// priority: { 'HostConfig.CpuShares': 100 }
|
||||
// beta: { 'dotted.path.here', 'value'}
|
||||
// }
|
||||
const compileGroupConfig = JSON.parse(
|
||||
process.env.COMPILE_GROUP_DOCKER_CONFIGS || '{}'
|
||||
)
|
||||
module.exports.clsi.docker.compileGroupConfig = compileGroupConfig
|
||||
} catch (error) {
|
||||
console.error(error, 'could not apply compile group docker configs')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
try {
|
||||
seccompProfilePath = Path.resolve(__dirname, '../seccomp/clsi-profile.json')
|
||||
module.exports.clsi.docker.seccomp_profile = JSON.stringify(
|
||||
|
||||
Reference in New Issue
Block a user