Compare commits
4 Commits
4483cdbe3e
...
f9aac54735
Author | SHA1 | Date |
---|---|---|
Thomas Hobson | f9aac54735 | |
Thomas Hobson | 85cba0d89d | |
Brikaa | 6ca9606f81 | |
Dan Vargas | 0f440c082b |
|
@ -53,7 +53,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build Packages
|
- name: Build Packages
|
||||||
run: |
|
run: |
|
||||||
PACKAGES=$(jq '.[]' -r ${HOME}/files.json | awk -F/ '$2 && $3{ print $2 "-" $3 }' | sort -u)
|
PACKAGES=$(jq '.[]' -r ${HOME}/files*.json | awk -F/ '$1~/packages/ && $2 && $3{ print $2 "-" $3 }' | sort -u)
|
||||||
echo "Packages: $PACKAGES"
|
echo "Packages: $PACKAGES"
|
||||||
docker pull docker.pkg.github.com/engineer-man/piston/repo-builder:latest
|
docker pull docker.pkg.github.com/engineer-man/piston/repo-builder:latest
|
||||||
docker build -t repo-builder repo
|
docker build -t repo-builder repo
|
||||||
|
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build Packages
|
- name: Build Packages
|
||||||
run: |
|
run: |
|
||||||
PACKAGES=$(jq '.[]' -r ${HOME}/files.json | awk -F/ '{ print $2 "-" $3 }' | sort -u)
|
PACKAGES=$(jq '.[]' -r ${HOME}/files*.json | awk -F/ '$1~/packages/ && $2 && $3{ print $2 "-" $3 }' | sort -u)
|
||||||
echo "Packages: $PACKAGES"
|
echo "Packages: $PACKAGES"
|
||||||
docker pull docker.pkg.github.com/engineer-man/piston/repo-builder:latest
|
docker pull docker.pkg.github.com/engineer-man/piston/repo-builder:latest
|
||||||
docker build -t repo-builder repo
|
docker build -t repo-builder repo
|
||||||
|
|
|
@ -106,11 +106,11 @@ function get_job(body) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let constraint of ['memory_limit', 'timeout']) {
|
for (const constraint of ['memory_limit', 'timeout']) {
|
||||||
for (let type of ['compile', 'run']) {
|
for (const type of ['compile', 'run']) {
|
||||||
let constraint_name = `${type}_${constraint}`;
|
const constraint_name = `${type}_${constraint}`;
|
||||||
let constraint_value = body[constraint_name];
|
const constraint_value = body[constraint_name];
|
||||||
let configured_limit = rt[`${constraint}s`][type];
|
const configured_limit = rt[`${constraint}s`][type];
|
||||||
if (!constraint_value) {
|
if (!constraint_value) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ function parse_overrides(overrides) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function validate_overrides(overrides, options) {
|
function validate_overrides(overrides, options) {
|
||||||
for (let language in overrides) {
|
for (const language in overrides) {
|
||||||
for (let key in overrides[language]) {
|
for (const key in overrides[language]) {
|
||||||
if (
|
if (
|
||||||
![
|
![
|
||||||
'max_process_count',
|
'max_process_count',
|
||||||
|
@ -28,13 +28,13 @@ function validate_overrides(overrides, options) {
|
||||||
logger.error(`Invalid overridden option: ${key}`);
|
logger.error(`Invalid overridden option: ${key}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let option = options.find(o => o.key === key);
|
const option = options.find(o => o.key === key);
|
||||||
let parser = option.parser;
|
const parser = option.parser;
|
||||||
let raw = overrides[language][key];
|
const raw = overrides[language][key];
|
||||||
let value = parser(raw);
|
const value = parser(raw);
|
||||||
let validators = option.validators;
|
const validators = option.validators;
|
||||||
for (let validator of validators) {
|
for (const validator of validators) {
|
||||||
let response = validator(value, raw);
|
const response = validator(value, raw);
|
||||||
if (response !== true) {
|
if (response !== true) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Failed to validate overridden option: ${key}`,
|
`Failed to validate overridden option: ${key}`,
|
||||||
|
|
Loading…
Reference in New Issue