From d274d958adb68b18413f339c3872a3e52e814c98 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 19 Aug 2022 23:15:19 -0700 Subject: [PATCH] document more CI feature TODOs --- src/job_doer.zig | 1 + src/main.zig | 4 ++++ tools/gen_stage2.sh | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/src/job_doer.zig b/src/job_doer.zig index 01aca18..332952b 100644 --- a/src/job_doer.zig +++ b/src/job_doer.zig @@ -59,6 +59,7 @@ pub fn start(allocator: std.mem.Allocator, job: *db.Job, run_tracker: *std.Threa // start qemu-system docker container, get id const image = getImageName(job.arch.tag); + // TODO make zig version part of image name, dont hardcode this path const env = try std.fmt.allocPrint(alloc, "image=/images/{s}/{s}/stage4.qcow2", .{ @tagName(job.arch.tag), @tagName(job.os.tag) }); const bind = try std.fmt.allocPrint(alloc, "{s}:/images:ro", .{host_images_path}); const id = blk: { diff --git a/src/main.zig b/src/main.zig index 1b9458c..ab20cf0 100644 --- a/src/main.zig +++ b/src/main.zig @@ -169,6 +169,10 @@ pub fn main() !void { var arena = std.heap.ArenaAllocator.init(alloc); defer arena.deinit(); try runner.pullImages(arena.allocator()); + // TODO ensure these semaphores are being used properly + // TODO ensure the nektro/docker-qemu-system docker images are pulled + // TODO implement the /jobs/:job web endpoint + // TODO only publish version when all jobs have passed for (try db.Job.byKeyAll(arena.allocator(), .state, .queued, .asc)) |_| runner.sem_pickup.post(); for (range(try std.fmt.parseInt(u32, flag.getSingle("ci-max-jobs") orelse "10", 10))) |_| runner.sem_runner.post(); diff --git a/tools/gen_stage2.sh b/tools/gen_stage2.sh index b0168ac..f9f53b4 100755 --- a/tools/gen_stage2.sh +++ b/tools/gen_stage2.sh @@ -31,10 +31,19 @@ sudo qemu-nbd --connect=/dev/nbd0 $after sudo fdisk /dev/nbd0 -l case "$os" in + # TODO auto pick the the biggest drive for target device debian) + # Device Boot Start End Sectors Size Id Type + # /dev/nbd0p1 * 2048 132216831 132214784 63G 83 Linux + # /dev/nbd0p2 132218878 134215679 1996802 975M 5 Extended + # /dev/nbd0p5 132218880 134215679 1996800 975M 82 Linux swap / Solaris sudo mount --rw /dev/nbd0p1 $(pwd)/mnt/ ;; alpine) + # Device Boot Start End Sectors Size Id Type + # /dev/nbd0p1 * 2048 206847 204800 100M 83 Linux + # /dev/nbd0p2 206848 8357887 8151040 3.9G 82 Linux swap / Solaris + # /dev/nbd0p3 8357888 134217727 125859840 60G 83 Linux sudo mount --rw /dev/nbd0p3 $(pwd)/mnt/ ;; esac