simple_ci/notes

76 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2023-02-06 10:58:03 +00:00
Notes Version 4
2023-02-06 09:13:26 +00:00
Use a "config.toml" to specify repos to pull and build from.
Will probably have entries like:
[[project]]
clone_url = "https://github.com/username/project.git"
2023-02-06 09:13:26 +00:00
[[project]]
clone_url = "https://github.com/username/project2.git"
always_approve = true
[[user]]
username = "somebody"
password_hash = "..."
password_salt = "..."
2023-02-06 10:46:37 +00:00
permissions = ["view_project"]
2023-02-06 09:13:26 +00:00
[[user]]
username = "another_person"
password_hash = "..."
password_salt = "..."
otp_secret = "..."
2023-02-06 10:46:37 +00:00
permissions = ["add_project", "view_project"]
[[user]]
2023-02-06 09:13:26 +00:00
username = "someone_else"
password_hash = "..."
password_salt = "..."
otp_secret = "..."
2023-02-06 10:58:03 +00:00
permissions = ["create_user", "create_admin", "add_project", "remove_project", "view_project", "approve_deny_build"]
2023-02-06 09:13:26 +00:00
The project should have a "/.simple_ci/" at HEAD. There should be a
"/.simple_ci/build.toml" with entries like:
# The root directory refers to the root of the project for "working_directory".
# If the "working_directory" doesn't exist, simple_ci should create it first.
# It will probably use something like "/usr/bin/mkdir -p ...".
working_directory = "/build"
build_artifacts = ["./the_executable", "./docs/"]
2023-02-06 09:13:26 +00:00
build_steps = ["prepare_cmds", "build_cmds", "post_build_cmds"]
[[prepare_cmds]]
cmd = "./prepare.sh"
args = []
[[build_cmds]]
cmd = "/usr/bin/make"
args = ["all"]
[[build_cmds]]
cmd = "./test.sh"
args = []
[[build_cmds]]
cmd = "./not_important_test.sh"
args = []
allow_fail = true
[[post_build_cmds]]
cmd = "/usr/bin/make"
args = ["docs"]
[[post_build_cmds]]
cmd = "/usr/bin/cp"
args = ["./output/the_exe", "./the_executable"]
2023-02-06 09:13:26 +00:00
The simple_ci server should store "build.toml" entries from configured project
repos for approval by an administrator before doing anything with them. Ideally,
this will be done on a front-end website that requires login and shows the
2023-02-06 09:13:26 +00:00
"build.toml" from each configured project repo for approval or denial. The
back-end should store the approved "build.toml" per each repo so that the next
time the ci runs, it will verify that the files match. Any changes will require
2023-02-06 09:13:26 +00:00
the administrator to re-approve that repo's "build.toml". A single repository
will only have a single "build.toml" stored for it (assuming it was approved).
Ideally, the front-end would also enable the administrator to add/remove repos
to load from and build. This should enable editing the server-side "config.toml"
from this front-end as well.
2023-02-06 09:13:26 +00:00
If any of the commands specified in the projects "build.toml" fails, then
simple_ci should halt the "build" and leave a note to be viewed on the
2023-02-06 09:13:26 +00:00
front-end. Note that a cmd specified in a project's "build.toml" can set
"allow_fail = true" which will ignore failure for that specific command. Success
statuses should also be noted on the front-end.