diff --git a/api/docker.ml b/api/docker.ml index 8cd0f3b..cb7e343 100644 --- a/api/docker.ml +++ b/api/docker.ml @@ -36,7 +36,7 @@ module Spec = struct } type options = { - triggering_build_args : string list; + build_args : string list; nontriggering_build_args : string list; squash : bool; buildkit: bool; @@ -50,7 +50,7 @@ module Spec = struct } let defaults = { - triggering_build_args = []; + build_args = []; nontriggering_build_args = []; squash = false; buildkit = false; @@ -66,8 +66,8 @@ module Spec = struct | `Contents contents -> Dockerfile.contents_set dockerfile_b contents | `Path path -> Dockerfile.path_set dockerfile_b path end; - let { triggering_build_args; nontriggering_build_args; squash; buildkit; include_git } = options in - DB.triggering_build_args_set_list b triggering_build_args |> ignore; + let { build_args; nontriggering_build_args; squash; buildkit; include_git } = options in + DB.build_args_set_list b build_args |> ignore; DB.nontriggering_build_args_set_list b nontriggering_build_args |> ignore; DB.squash_set b squash; DB.buildkit_set b buildkit; @@ -92,12 +92,12 @@ module Spec = struct let target = R.push_target_get r in let user = R.push_user_get r in let password = R.push_password_get r in - let triggering_build_args = R.triggering_build_args_get_list r in + let build_args = R.build_args_get_list r in let nontriggering_build_args = R.nontriggering_build_args_get_list r in let squash = R.squash_get r in let buildkit = R.buildkit_get r in let include_git = R.include_git_get r in - let options = { triggering_build_args; nontriggering_build_args; squash; buildkit; include_git } in + let options = { build_args; nontriggering_build_args; squash; buildkit; include_git } in let push_to = match target, user, password with | "", "", "" -> None diff --git a/api/docker.mli b/api/docker.mli index 5ecc573..b2e2c5b 100644 --- a/api/docker.mli +++ b/api/docker.mli @@ -18,7 +18,7 @@ module Spec : sig } type options = { - triggering_build_args : string list; (** "--build-arg" arguments, changing these arguments triggers an OCurrent rebuild *) + build_args : string list; (** "--build-arg" arguments, changing these arguments triggers an OCurrent rebuild *) nontriggering_build_args : string list; (** Changing these arguments does not trigger a rebuild *) squash : bool; buildkit: bool; diff --git a/api/schema.capnp b/api/schema.capnp index 0bfb84f..993a568 100644 --- a/api/schema.capnp +++ b/api/schema.capnp @@ -21,10 +21,10 @@ struct DockerBuild { pushUser @3 :Text; pushPassword @4 :Text; - triggeringBuildArgs @5 :List(Text); + buildArgs @5 :List(Text); nontriggeringBuildArgs @6 :List(Text); # Options to pass to `docker build` using `--build-arg`. - # Triggering args trigger OCurrent rebuilds on changing, nontriggering args do not. + # buildArgs trigger OCurrent rebuilds on changing, nontriggeringBuildArgs do not. squash @7 :Bool; # Squash the image layers together using `--squash`. diff --git a/bin/client.ml b/bin/client.ml index d022c30..c21963c 100644 --- a/bin/client.ml +++ b/bin/client.ml @@ -192,13 +192,13 @@ let push_password_file = ~docv:"PATH" ["push-password"] -let triggering_build_args = +let build_args = Arg.value @@ Arg.(opt_all string) [] @@ Arg.info ~doc:"Docker build argument; triggers OCurrent rebuild on change." ~docv:"ARG" - ["build-arg"; "triggering-build-arg"] + ["build-arg"] let nontriggering_build_args = Arg.value @@ @@ -254,10 +254,10 @@ let push_to = Term.(const make $ push_to $ push_user $ push_password_file) let build_options = - let make triggering_build_args nontriggering_build_args squash buildkit include_git = - { Cluster_api.Docker.Spec.triggering_build_args; nontriggering_build_args; squash; buildkit; include_git } + let make build_args nontriggering_build_args squash buildkit include_git = + { Cluster_api.Docker.Spec.build_args; nontriggering_build_args; squash; buildkit; include_git } in - Term.(const make $ triggering_build_args $ nontriggering_build_args $ squash $ buildkit $ include_git) + Term.(const make $ build_args $ nontriggering_build_args $ squash $ buildkit $ include_git) let submit_options_common = let make submission_path pool repository commits cache_hint urgent secrets = diff --git a/worker/cluster_worker.ml b/worker/cluster_worker.ml index f59cdf8..a197f22 100644 --- a/worker/cluster_worker.ml +++ b/worker/cluster_worker.ml @@ -409,8 +409,8 @@ let default_build ?obuilder ~switch ~log ~src ~secrets = function | Ok path -> Lwt_result.return path | Error e -> Lwt_result.fail e end >>!= fun dockerpath -> - let { Cluster_api.Docker.Spec.triggering_build_args; nontriggering_build_args; squash; buildkit; include_git = _ } = options in - let build_args = triggering_build_args @ nontriggering_build_args in + let { Cluster_api.Docker.Spec.build_args; nontriggering_build_args; squash; buildkit; include_git = _ } = options in + let build_args = build_args @ nontriggering_build_args in let args = List.concat_map (fun x -> ["--build-arg"; x]) build_args @ (if squash then ["--squash"] else [])