diff --git a/CHANGELOG.md b/CHANGELOG.md index aed7571..c55e16b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Migrated codebase to V 0.3.2 * Cron expression parser now uses bitfields instead of bool arrays * Added option to deploy using agent-server architecture instead of cron daemon +* Allow force-building packages, meaning the build won't check if the + repository is already up to date +* Allow scheduling builds on the server from the CLI tool instead of building + them locally ### Fixed diff --git a/src/agent/images.v b/src/agent/images.v index 64a8f74..185192e 100644 --- a/src/agent/images.v +++ b/src/agent/images.v @@ -9,9 +9,9 @@ import build // structure can manage images from any number of base images, paving the way // for configurable base images per target/repository. struct ImageManager { -mut: max_image_age int [required] - // For each base images, one or more builder images can exist at the same +mut: + // For each base image, one or more builder images can exist at the same // time images map[string][]string [required] // For each base image, we track when its newest image was built diff --git a/src/client/jobs.v b/src/client/jobs.v index 2d8e99b..440affa 100644 --- a/src/client/jobs.v +++ b/src/client/jobs.v @@ -13,6 +13,8 @@ pub fn (c &Client) poll_jobs(arch string, max int) ![]BuildConfig { return data.data } +// queue_job adds a new one-time build job for the given target to the job +// queue. pub fn (c &Client) queue_job(target_id int, arch string, force bool) !Response { data := c.send_request(.post, '/api/v1/jobs/queue', { 'target': target_id.str() diff --git a/src/server/api_jobs.v b/src/server/api_jobs.v index b75e70e..7795351 100644 --- a/src/server/api_jobs.v +++ b/src/server/api_jobs.v @@ -20,6 +20,7 @@ fn (mut app App) v1_poll_job_queue() web.Result { return app.json(.ok, new_data_response(out)) } +// v1_queue_job allows queueing a new one-time build job for the given target. ['/api/v1/jobs/queue'; auth; post] fn (mut app App) v1_queue_job() web.Result { target_id := app.query['target'] or {