use only lower case docker image names

pull/79/head
Alexander Bentkamp 3 years ago
parent b6052a7e89
commit ef8815f306

@ -68,8 +68,8 @@
"start_client": "NODE_ENV=development webpack-dev-server --hot", "start_client": "NODE_ENV=development webpack-dev-server --hot",
"build": "NODE_ENV=production webpack", "build": "NODE_ENV=production webpack",
"production": "NODE_ENV=production node server/index.mjs", "production": "NODE_ENV=production node server/index.mjs",
"build_robo": "rm -rf ./Robo && git clone https://github.com/hhu-adam/Robo && docker build ./Robo --file ./Robo/Dockerfile --tag github-hhu-adam:Robo && rm -rf ./Robo", "build_robo": "rm -rf ./Robo && git clone https://github.com/hhu-adam/Robo && docker build ./Robo --file ./Robo/Dockerfile --tag g/hhu-adam/robo && rm -rf ./Robo",
"build_nng": "rm -rf ./NNG4 && git clone https://github.com/hhu-adam/NNG4 && docker build ./NNG4 --file ./NNG4/Dockerfile --tag github-hhu-adam:NNG4 && rm -rf ./NNG4", "build_nng": "rm -rf ./NNG4 && git clone https://github.com/hhu-adam/NNG4 && docker build ./NNG4 --file ./NNG4/Dockerfile --tag g/hhu-adam/nng4 && rm -rf ./NNG4",
"update_lean": "./UPDATE_LEAN.sh" "update_lean": "./UPDATE_LEAN.sh"
}, },
"eslintConfig": { "eslintConfig": {

@ -87,7 +87,7 @@ async function doImport (owner, repo, id) {
if (manifest.length !== 1) { if (manifest.length !== 1) {
throw `Unexpected manifest: ${JSON.stringify(manifest)}` throw `Unexpected manifest: ${JSON.stringify(manifest)}`
} }
manifest[0].RepoTags = [`github-${owner?.toString().toLowerCase()}:${repo}`] manifest[0].RepoTags = [`g/${owner.toLowerCase()}/${repo.toLowerCase()}`]
fs.writeFileSync(`tmp/artifact_${artifactId}_inner/manifest.json`, JSON.stringify(manifest)); fs.writeFileSync(`tmp/artifact_${artifactId}_inner/manifest.json`, JSON.stringify(manifest));
await runProcess(id, "tar", ["-cvf", `../archive_${artifactId}.tar`, "."], `tmp/artifact_${artifactId}_inner/`) await runProcess(id, "tar", ["-cvf", `../archive_${artifactId}.tar`, "."], `tmp/artifact_${artifactId}_inner/`)
await runProcess(id, "docker", ["load", "-i", `tmp/archive_${artifactId}.tar`]) await runProcess(id, "docker", ["load", "-i", `tmp/archive_${artifactId}.tar`])

@ -16,13 +16,13 @@ import { importTrigger, importStatus } from './import.mjs'
* use a project directory instead of a docker container. * use a project directory instead of a docker container.
*/ */
const games = { const games = {
"github-hhu-adam:Robo": { "g/hhu-adam/robo": {
name: "Adam", name: "Adam",
module: "Adam", module: "Adam",
dir: "../../../../Robo", dir: "../../../../Robo",
queueLength: 5 queueLength: 5
}, },
"github-hhu-adam:NNG4": { "g/hhu-adam/nng4": {
name: "NNG", name: "NNG",
module: "NNG", module: "NNG",
dir: "../../../../NNG4", dir: "../../../../NNG4",
@ -101,7 +101,7 @@ wss.addListener("connection", function(ws, req) {
if (!reRes) { console.error(`Connection refused because of invalid URL: ${req.url}`); return; } if (!reRes) { console.error(`Connection refused because of invalid URL: ${req.url}`); return; }
const owner = reRes[1] const owner = reRes[1]
const repo = reRes[2] const repo = reRes[2]
const tag = `github-${owner}:${repo}` const tag = `g/${owner.toLowerCase()}/${repo.toLowerCase()}`
let ps; let ps;
if (!queue[tag] || queue[tag].length == 0) { if (!queue[tag] || queue[tag].length == 0) {

Loading…
Cancel
Save